11import { setupNavbar } from "./navbar.js" ;
2- import { setupExtensionButton } from "./extension.js" ;
3- import { setupLibraries } from "./libraries.js" ;
42import { setupTokenEditor , setTokenEditorValue } from "../editor" ;
53import { setupJwtCounter } from "./counter.js" ;
64import { setupSmoothScrolling } from "./smooth-scrolling.js" ;
75import { setupHighlighting } from "./highlighting.js" ;
8- import { isChrome , isFirefox , isPartiallyInViewport , once } from "./utils.js" ;
96import { setupShareJwtButton } from "../share-button.js" ;
107import {
11- publicKeyTextArea ,
12- debuggerSection ,
13- extensionSection ,
14- ebookSection ,
15- shareJwtButton ,
16- shareJwtTextElement ,
17- librariesElement
8+ publicKeyTextArea ,
9+ debuggerSection ,
10+ shareJwtButton ,
11+ shareJwtTextElement ,
1812} from "./dom-elements.js" ;
1913
2014import queryString from "querystring" ;
2115
2216/* For initialization, look at the end of this file */
2317
2418function parseLocationQuery ( ) {
25- const locSearch = queryString . parse ( document . location . search . substr ( 1 ) ) ;
26- const locHash = queryString . parse ( document . location . hash . substr ( 1 ) ) ;
27-
28- const keys = [
29- "id_token" ,
30- "access_token" ,
31- "value" ,
32- "token" ,
33- "debugger-io?token"
34- ] ;
35- for ( const key of keys ) {
36- const token = locSearch [ key ] || locHash [ key ] ;
37-
38- if ( token ) {
39- if ( locSearch . publicKey || locHash . publicKey ) {
40- publicKeyTextArea . value = locSearch . publicKey || locHash . publicKey ;
41- }
42-
43- setTokenEditorValue ( token ) ;
44-
45- debuggerSection . scrollIntoView ( true ) ;
46-
47- break ;
19+ const locSearch = queryString . parse ( document . location . search . substr ( 1 ) ) ;
20+ const locHash = queryString . parse ( document . location . hash . substr ( 1 ) ) ;
21+
22+ const keys = [
23+ "id_token" ,
24+ "access_token" ,
25+ "value" ,
26+ "token" ,
27+ "debugger-io?token"
28+ ] ;
29+ for ( const key of keys ) {
30+ const token = locSearch [ key ] || locHash [ key ] ;
31+
32+ if ( token ) {
33+ if ( locSearch . publicKey || locHash . publicKey ) {
34+ publicKeyTextArea . value = locSearch . publicKey || locHash . publicKey ;
35+ }
36+
37+ setTokenEditorValue ( token ) ;
38+
39+ debuggerSection . scrollIntoView ( true ) ;
40+
41+ break ;
42+ }
4843 }
49- }
5044}
5145
5246// Initialization
5347setupNavbar ( ) ;
54- // setupExtensionButton();
5548setupSmoothScrolling ( ) ;
56- setupLibraries ( ) ;
5749setupTokenEditor ( ) ;
5850parseLocationQuery ( ) ;
5951setupHighlighting ( ) ;
6052setupJwtCounter ( ) ;
61- setupShareJwtButton ( shareJwtButton , shareJwtTextElement ) ;
53+ setupShareJwtButton ( shareJwtButton , shareJwtTextElement ) ;
0 commit comments