1010< link rel ="stylesheet " href ="/FontAwesome/css/font-awesome.css ">
1111< link rel ="stylesheet " href ="/css/variables.css ">
1212< link rel ="stylesheet " href ="/css/chrome.css ">
13+
14+ < link rel ="stylesheet " href ="/FRC-Programming-Guide/css/font-awesome.css ">
15+ < link rel ="stylesheet " href ="/FRC-Programming-Guide/css/chrome.css ">
16+ < link rel ="stylesheet " href ="/FRC-Programming-Guide/css/variables.css ">
1317< style >
1418 : root {
1519 --bg : # 0b0f14 ; --panel : # 071018 ; --muted : # 94a3b8 ; --accent : # 9b7cff ;
@@ -194,6 +198,7 @@ <h3 id="confirmModalTitle">Delete Note?</h3>
194198 }
195199
196200 function findExistingNoteKeyForAbsPath ( absPath ) {
201+ const base = getBasePath ( ) ;
197202 for ( let i = 0 ; i < LS . length ; i ++ ) {
198203 const k = LS . key ( i ) ;
199204 if ( ! k || ! k . startsWith ( NOTE_PREFIX ) ) continue ;
@@ -202,11 +207,11 @@ <h3 id="confirmModalTitle">Delete Note?</h3>
202207 if ( '/' + suffix === absPath ) return k ;
203208 const replaced = suffix . replace ( / _ / g, '/' ) ;
204209 try {
205- const resolved = new URL ( replaced , location . origin + '/' ) . pathname ;
210+ const resolved = new URL ( replaced , base ) . pathname ;
206211 if ( resolved === absPath ) return k ;
207212 } catch ( e ) { }
208213 try {
209- const resolved2 = new URL ( suffix , location . origin + '/' ) . pathname ;
214+ const resolved2 = new URL ( suffix , base ) . pathname ;
210215 if ( resolved2 === absPath ) return k ;
211216 } catch ( e ) { }
212217 }
@@ -273,7 +278,7 @@ <h3 id="confirmModalTitle">Delete Note?</h3>
273278 const title = document . createElement ( 'span' ) ; title . className = 'title' ; title . textContent = node . title || '(untitled)' ;
274279 left . appendChild ( title ) ;
275280 if ( node . link ) {
276- const meta = document . createElement ( 'span' ) ; meta . className = 'meta' ; meta . textContent = node . link . replace ( / ^ \/ * / , '' ) ;
281+ const meta = document . createElement ( 'span' ) ; meta . className = 'meta' ; meta . textContent = node . link . replace ( / ^ \/ * / , '' ) ;
277282 left . appendChild ( meta ) ;
278283 }
279284 pageItem . appendChild ( left ) ;
@@ -329,7 +334,7 @@ <h3 id="confirmModalTitle">Delete Note?</h3>
329334 const title = document . createElement ( 'span' ) ; title . className = 'title' ; title . textContent = node . title ;
330335 left . appendChild ( title ) ;
331336 if ( node . link ) {
332- const meta = document . createElement ( 'span' ) ; meta . className = 'meta' ; meta . textContent = node . link . replace ( / ^ \/ * / , '' ) ;
337+ const meta = document . createElement ( 'span' ) ; meta . className = 'meta' ; meta . textContent = node . link . replace ( / ^ \/ * / , '' ) ;
333338 left . appendChild ( meta ) ;
334339 }
335340 titleSpan . appendChild ( left ) ;
@@ -596,6 +601,7 @@ <h3 id="confirmModalTitle">Delete Note?</h3>
596601} ) ( ) ;
597602</ script >
598603
604+
599605< script >
600606 document . addEventListener ( 'DOMContentLoaded' , ( ) => {
601607 const theme = localStorage . getItem ( 'mdbook-theme' ) ;
0 commit comments