File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -60,10 +60,13 @@ if ( location.protocol.substr(0,4) === 'file' ||
6060 location . protocol . substr ( 0 , 11 ) === '*-extension' ||
6161 location . protocol . substr ( 0 , 6 ) === 'widget' ) {
6262 $ ( function ( ) {
63+ // Check to see if ajax can be used. This does a quick ajax request and blocks the page until its done
64+ // Start with links with only the trailing slash, and then move on to the ones that start with ..
6365 $ ( "a" )
64- . filter ( "[href='../']" ) . attr ( "href" , "../index.html" ) . end ( )
65- . filter ( "[href='../../']" ) . attr ( "href" , "../../index.html" ) . end ( )
66- . filter ( "[href='../../../']" ) . attr ( "href" , "../../../index.html" ) ;
66+ . filter ( "[href='/']" ) . attr ( "href" , "/index.html" ) . end ( )
67+ . filter ( "[href^='..']" ) . filter ( "[href$='/']" ) . each ( function ( ) {
68+ this . href = $ ( this ) . attr ( "href" ) + "index.html" ;
69+ } ) ;
6770 } ) ;
6871
6972 // Check to see if ajax can be used. This does a quick ajax request and blocks the page until its done
You can’t perform that action at this time.
0 commit comments