File tree Expand file tree Collapse file tree 1 file changed +30
-1
lines changed
Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ window.onload = async () => {
1717 linkData = decodeLink ( window . location . href ) ;
1818
1919 // clear URL
20- window . history . pushState ( window . location . origin , 'Codeit' , window . location . origin + '/full' ) ;
20+ window . history . replaceState ( window . location . origin , 'Codeit' , window . location . origin + '/full' ) ;
2121
2222
2323 // if treeLoc is in local storage
@@ -109,6 +109,35 @@ window.onload = async () => {
109109 }
110110
111111 } )
112+
113+ // if git code exists in link
114+ if ( linkData . gitCode ) {
115+
116+ // hide intro screen
117+ sidebar . classList . remove ( 'intro' ) ;
118+
119+ // if on safari, refresh header color
120+ if ( isSafari ) {
121+
122+ document . querySelector ( 'meta[name="theme-color"]' ) . content = '#313744' ;
123+
124+ onNextFrame ( ( ) => {
125+
126+ document . querySelector ( 'meta[name="theme-color"]' ) . content = '#1a1c24' ;
127+
128+ } ) ;
129+
130+ }
131+
132+ // start loading
133+ startLoading ( ) ;
134+
135+ const gitCode = linkData . gitCode ;
136+
137+ // get git token from Github
138+ getGithubToken ( gitCode ) ;
139+
140+ }
112141
113142
114143 loadLS ( ) ;
You can’t perform that action at this time.
0 commit comments