File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
templates/default/fulldoc/html Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 55 < title > <%= options . title %> </ title >
66</ head >
77< script type ="text/javascript ">
8- var match = decodeURIComponent ( window . location . hash ) . match ( / ^ # ! ( .+ ) / ) ;
9- var name = match ? match [ 1 ] : '<%= url_for_main %> ' ;
10- name = name . replace ( / ^ ( ( \w * ) : ) ? [ \/ \\ ] * / gm, '' ) . trim ( ) ;
11- window . top . location . replace ( name )
8+ try {
9+ var match = decodeURIComponent ( window . location . hash ) . match ( / ^ # ! ( .+ ) / ) ;
10+ var name = match ? match [ 1 ] : '<%= url_for_main %> ' ;
11+ var url = new URL ( name , location . href ) ;
12+ window . top . location . replace ( url . origin === location . origin ? name : '<%= url_for_main %> ' ) ;
13+ } catch ( e ) {
14+ window . top . location . replace ( '<%= url_for_main %> ' ) ;
15+ }
1216</ script >
1317< noscript >
1418 < h1 > Oops!</ h1 >
You can’t perform that action at this time.
0 commit comments