From 85569deef64e749f415080a3270a2ca5d33094e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20E=2E=20Peyrott?= Date: Mon, 15 Jan 2018 18:50:02 -0300 Subject: [PATCH] Extension and website working together. --- Gruntfile.js | 166 ++++++++++++++--- html/extension/bg.html | 3 + img/{ => extension}/bg_arrow_select.svg | 0 img/extension/debugger-logo.svg | 35 ++++ .../favicon/android-icon-192x192.png | Bin .../favicon/android-icon-48x48.png | Bin img/{ => extension}/favicon/favicon-16x16.png | Bin img/{ => extension}/favicon/favicon-32x32.png | Bin img/{ => extension}/favicon/favicon-96x96.png | Bin img/extension/favicon/icon-128x128.png | Bin 0 -> 3551 bytes .../favicon/icon-chrome-store-128x128.png | Bin 0 -> 4246 bytes img/{ => extension}/ico_logo.svg | 0 img/extension/icon-chromeless.svg | 29 +++ {assets => img/extension}/icon.svg | 0 {assets => img/extension}/logo.svg | 0 img/extension/share-badge.svg | 33 ++++ img/{ => website}/1.svg | 0 img/{ => website}/10.svg | 0 img/{ => website}/11.svg | 0 img/{ => website}/12.svg | 0 img/{ => website}/13.svg | 0 img/{ => website}/14.svg | 0 img/{ => website}/15.svg | 0 img/{ => website}/16.svg | 0 img/{ => website}/17.svg | 0 img/{ => website}/18.svg | 0 img/{ => website}/19.svg | 0 img/{ => website}/2.svg | 0 img/{ => website}/20.svg | 0 img/{ => website}/21.svg | 0 img/{ => website}/22.svg | 0 img/{ => website}/23.svg | 0 img/{ => website}/24.svg | 0 img/{ => website}/25.svg | 0 img/{ => website}/3.svg | 0 img/{ => website}/4.svg | 0 img/{ => website}/5.svg | 0 img/{ => website}/6.svg | 0 img/{ => website}/7.svg | 0 img/{ => website}/8.svg | 0 img/{ => website}/9.svg | 0 {assets => img/website}/badge-compatible.svg | 0 {assets => img/website}/badge.svg | 0 img/{ => website}/bg_arrow.svg | 0 img/website/bg_arrow_select.svg | 14 ++ img/{ => website}/bg_steps.svg | 0 img/{ => website}/facebook-card.png | Bin .../favicon/android-icon-144x144.png | Bin .../favicon/android-icon-192x192.png} | Bin .../favicon/android-icon-36x36.png | Bin img/website/favicon/android-icon-48x48.png | Bin 0 -> 1395 bytes .../favicon/android-icon-72x72.png | Bin .../favicon/android-icon-96x96.png | Bin .../favicon/apple-icon-114x114.png | Bin .../favicon/apple-icon-120x120.png | Bin .../favicon/apple-icon-144x144.png | Bin .../favicon/apple-icon-152x152.png | Bin .../favicon/apple-icon-180x180.png | Bin .../favicon/apple-icon-57x57.png | Bin .../favicon/apple-icon-60x60.png | Bin .../favicon/apple-icon-72x72.png | Bin .../favicon/apple-icon-76x76.png | Bin .../favicon/apple-icon-precomposed.png} | Bin img/website/favicon/apple-icon.png | Bin 0 -> 4202 bytes img/{ => website}/favicon/browserconfig.xml | 0 img/website/favicon/favicon-16x16.png | Bin 0 -> 327 bytes img/website/favicon/favicon-32x32.png | Bin 0 -> 873 bytes img/website/favicon/favicon-96x96.png | Bin 0 -> 2176 bytes img/{ => website}/favicon/favicon.ico | Bin img/{ => website}/favicon/manifest.json | 0 img/{ => website}/favicon/ms-icon-144x144.png | Bin img/{ => website}/favicon/ms-icon-150x150.png | Bin img/{ => website}/favicon/ms-icon-310x310.png | Bin img/{ => website}/favicon/ms-icon-70x70.png | Bin img/{ => website}/ico_a0_white.svg | 0 img/{ => website}/ico_check.svg | 0 img/{ => website}/ico_check2.svg | 0 img/{ => website}/ico_close.svg | 0 img/{ => website}/ico_edit.svg | 0 img/{ => website}/ico_enlarge.svg | 0 img/{ => website}/ico_github.svg | 0 img/website/ico_logo.svg | 26 +++ img/{ => website}/ico_question.svg | 0 img/{ => website}/ico_star.svg | 0 img/{ => website}/ico_status.svg | 0 img/{ => website}/ico_twitter.svg | 0 img/website/icon.svg | 28 +++ img/website/logo-asset.svg | 27 +++ img/{ => website}/logo.svg | 0 img/{ => website}/pic_logo.svg | 0 img/{ => website}/pic_logo2.svg | 0 img/{ => website}/pic_logo3.svg | 0 img/{ => website}/pic_logo4.svg | 0 img/{ => website}/pic_logo_ft.svg | 0 img/{ => website}/pic_tshirt.png | Bin img/{ => website}/pic_tshirt_b.png | Bin img/{ => website}/q.svg | 0 img/{ => website}/twitter-card.png | Bin manifest.json | 43 +++++ src/dom-elements.js | 31 ++++ src/{ => editor}/default-tokens.js | 0 src/{website => }/editor/event-manager.js | 0 src/{website => }/editor/index.js | 9 +- src/{website => }/editor/instances.js | 0 src/{website => }/editor/jwt-mode.js | 0 src/{ => editor}/jwt.js | 0 src/{ => editor}/public-key-download.js | 2 +- src/{website => }/editor/tooltip.js | 0 src/{website => }/editor/utils.js | 0 src/extension/dom-elements.js | 1 + src/extension/index.js | 44 +++++ src/{website => }/strings.js | 0 src/utils.js | 79 +++++++++ src/website/dom-elements.js | 34 +--- src/website/extension.js | 2 +- src/website/index.js | 4 +- src/website/smooth-scrolling.js | 2 +- src/website/utils.js | 79 --------- stylus/extension/index.styl | 167 ++++++++++++++++++ stylus/{ => website}/codemirror.styl | 0 stylus/{ => website}/flip-clock.styl | 0 stylus/{ => website}/highlight.styl | 0 stylus/{app.styl => website/index.styl} | 0 stylus/{ => website}/mixins.styl | 0 views/extension/index.pug | 47 ++++- views/extension/layout.pug | 1 - views/stylesheets.pug | 2 +- views/website/assets.pug | 32 ++-- webpack.common.js | 30 ++++ webpack.extension-dev.js | 13 ++ webpack.extension-prod.js | 10 ++ webpack.website-dev.js | 36 +--- webpack.website-prod.js | 1 - 133 files changed, 835 insertions(+), 195 deletions(-) create mode 100644 html/extension/bg.html rename img/{ => extension}/bg_arrow_select.svg (100%) create mode 100644 img/extension/debugger-logo.svg rename img/{ => extension}/favicon/android-icon-192x192.png (100%) rename img/{ => extension}/favicon/android-icon-48x48.png (100%) rename img/{ => extension}/favicon/favicon-16x16.png (100%) rename img/{ => extension}/favicon/favicon-32x32.png (100%) rename img/{ => extension}/favicon/favicon-96x96.png (100%) create mode 100644 img/extension/favicon/icon-128x128.png create mode 100644 img/extension/favicon/icon-chrome-store-128x128.png rename img/{ => extension}/ico_logo.svg (100%) create mode 100644 img/extension/icon-chromeless.svg rename {assets => img/extension}/icon.svg (100%) rename {assets => img/extension}/logo.svg (100%) create mode 100644 img/extension/share-badge.svg rename img/{ => website}/1.svg (100%) rename img/{ => website}/10.svg (100%) rename img/{ => website}/11.svg (100%) rename img/{ => website}/12.svg (100%) rename img/{ => website}/13.svg (100%) rename img/{ => website}/14.svg (100%) rename img/{ => website}/15.svg (100%) rename img/{ => website}/16.svg (100%) rename img/{ => website}/17.svg (100%) rename img/{ => website}/18.svg (100%) rename img/{ => website}/19.svg (100%) rename img/{ => website}/2.svg (100%) rename img/{ => website}/20.svg (100%) rename img/{ => website}/21.svg (100%) rename img/{ => website}/22.svg (100%) rename img/{ => website}/23.svg (100%) rename img/{ => website}/24.svg (100%) rename img/{ => website}/25.svg (100%) rename img/{ => website}/3.svg (100%) rename img/{ => website}/4.svg (100%) rename img/{ => website}/5.svg (100%) rename img/{ => website}/6.svg (100%) rename img/{ => website}/7.svg (100%) rename img/{ => website}/8.svg (100%) rename img/{ => website}/9.svg (100%) rename {assets => img/website}/badge-compatible.svg (100%) rename {assets => img/website}/badge.svg (100%) rename img/{ => website}/bg_arrow.svg (100%) create mode 100644 img/website/bg_arrow_select.svg rename img/{ => website}/bg_steps.svg (100%) rename img/{ => website}/facebook-card.png (100%) rename img/{ => website}/favicon/android-icon-144x144.png (100%) rename img/{favicon/apple-icon-precomposed.png => website/favicon/android-icon-192x192.png} (100%) rename img/{ => website}/favicon/android-icon-36x36.png (100%) create mode 100755 img/website/favicon/android-icon-48x48.png rename img/{ => website}/favicon/android-icon-72x72.png (100%) rename img/{ => website}/favicon/android-icon-96x96.png (100%) rename img/{ => website}/favicon/apple-icon-114x114.png (100%) rename img/{ => website}/favicon/apple-icon-120x120.png (100%) rename img/{ => website}/favicon/apple-icon-144x144.png (100%) rename img/{ => website}/favicon/apple-icon-152x152.png (100%) rename img/{ => website}/favicon/apple-icon-180x180.png (100%) rename img/{ => website}/favicon/apple-icon-57x57.png (100%) rename img/{ => website}/favicon/apple-icon-60x60.png (100%) rename img/{ => website}/favicon/apple-icon-72x72.png (100%) rename img/{ => website}/favicon/apple-icon-76x76.png (100%) rename img/{favicon/apple-icon.png => website/favicon/apple-icon-precomposed.png} (100%) create mode 100755 img/website/favicon/apple-icon.png rename img/{ => website}/favicon/browserconfig.xml (100%) create mode 100755 img/website/favicon/favicon-16x16.png create mode 100755 img/website/favicon/favicon-32x32.png create mode 100755 img/website/favicon/favicon-96x96.png rename img/{ => website}/favicon/favicon.ico (100%) rename img/{ => website}/favicon/manifest.json (100%) rename img/{ => website}/favicon/ms-icon-144x144.png (100%) rename img/{ => website}/favicon/ms-icon-150x150.png (100%) rename img/{ => website}/favicon/ms-icon-310x310.png (100%) rename img/{ => website}/favicon/ms-icon-70x70.png (100%) rename img/{ => website}/ico_a0_white.svg (100%) rename img/{ => website}/ico_check.svg (100%) rename img/{ => website}/ico_check2.svg (100%) rename img/{ => website}/ico_close.svg (100%) rename img/{ => website}/ico_edit.svg (100%) rename img/{ => website}/ico_enlarge.svg (100%) rename img/{ => website}/ico_github.svg (100%) create mode 100644 img/website/ico_logo.svg rename img/{ => website}/ico_question.svg (100%) rename img/{ => website}/ico_star.svg (100%) rename img/{ => website}/ico_status.svg (100%) rename img/{ => website}/ico_twitter.svg (100%) create mode 100644 img/website/icon.svg create mode 100644 img/website/logo-asset.svg rename img/{ => website}/logo.svg (100%) rename img/{ => website}/pic_logo.svg (100%) rename img/{ => website}/pic_logo2.svg (100%) rename img/{ => website}/pic_logo3.svg (100%) rename img/{ => website}/pic_logo4.svg (100%) rename img/{ => website}/pic_logo_ft.svg (100%) rename img/{ => website}/pic_tshirt.png (100%) rename img/{ => website}/pic_tshirt_b.png (100%) rename img/{ => website}/q.svg (100%) rename img/{ => website}/twitter-card.png (100%) create mode 100644 manifest.json create mode 100644 src/dom-elements.js rename src/{ => editor}/default-tokens.js (100%) rename src/{website => }/editor/event-manager.js (100%) rename src/{website => }/editor/index.js (97%) rename src/{website => }/editor/instances.js (100%) rename src/{website => }/editor/jwt-mode.js (100%) rename src/{ => editor}/jwt.js (100%) rename src/{ => editor}/public-key-download.js (98%) rename src/{website => }/editor/tooltip.js (100%) rename src/{website => }/editor/utils.js (100%) create mode 100644 src/extension/dom-elements.js create mode 100644 src/extension/index.js rename src/{website => }/strings.js (100%) create mode 100644 stylus/extension/index.styl rename stylus/{ => website}/codemirror.styl (100%) rename stylus/{ => website}/flip-clock.styl (100%) rename stylus/{ => website}/highlight.styl (100%) rename stylus/{app.styl => website/index.styl} (100%) rename stylus/{ => website}/mixins.styl (100%) create mode 100644 webpack.common.js create mode 100644 webpack.extension-dev.js create mode 100644 webpack.extension-prod.js diff --git a/Gruntfile.js b/Gruntfile.js index bba76220..8f3b2cbc 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,6 +1,3 @@ -const websiteWebpackConfigDev = require('./webpack.website-dev.js'); -const websiteWebpackConfigProd = require('./webpack.website-prod.js'); - module.exports = grunt => { grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-stylus'); @@ -10,12 +7,21 @@ module.exports = grunt => { grunt.loadNpmTasks('grunt-contrib-clean'); grunt.initConfig({ - clean: [ 'dist' ], + clean: { + website: [ 'dist/website' ], + extension: ['dist/extension'] + }, + copy: { - main: { + website: { files: [{ expand: true, - src: ['img/**', 'fonts/**', 'assets/**', 'opensearch.xml'], + cwd: 'img/website', + src: ['**'], + dest: 'dist/website/img' + }, { + expand: true, + src: ['fonts/**', 'opensearch.xml'], dest: 'dist/website' }, { expand: true, @@ -29,39 +35,96 @@ module.exports = grunt => { ], dest: 'dist/website/css/' }] + }, + extension: { + files: [{ + expand: true, + flatten: true, + src: ['manifest.json', 'html/extension/bg.html'], + dest: 'dist/extension' + }, { + expand: true, + cwd: 'img/extension', + src: ['**'], + dest: 'dist/extension/img' + }, { + expand: true, + src: ['fonts/**'], + dest: 'dist/extension' + }, { + expand: true, + flatten: true, + src: [ + 'node_modules/bootstrap/dist/css/bootstrap.min.css', + 'node_modules/codemirror/lib/codemirror.css', + 'node_modules/codemirror/addon/lint/lint.css', + 'css/budicon.css', + 'css/google-roboto-mono.css' + ], + dest: 'dist/extension/css/' + }] } }, + stylus: { - compile: { + website: { + files: { + 'dist/website/css/index.css': 'stylus/website/index.styl' + } + }, + extension: { files: { - 'dist/website/css/app.css': 'stylus/app.styl' + 'dist/extension/css/index.css': 'stylus/extension/index.styl' } } }, + pug: { - compile: { + website: { files: { 'dist/website/index.html': 'views/website/index.pug', 'dist/website/introduction/index.html': 'views/website/introduction.pug' } + }, + extension: { + files: { + 'dist/extension/index.html': 'views/extension/index.pug' + } } }, + webpack: { - prod: websiteWebpackConfigProd, - dev: websiteWebpackConfigDev + websiteProd: require('./webpack.website-prod.js'), + websiteDev: require('./webpack.website-dev.js'), + extensionProd: require('./webpack.extension-prod.js'), + extensionDev: require('./webpack.extension-dev.js'), }, + watch: { - js: { - files: 'src/**', - tasks: 'webpack:dev' + websiteSrc: { + files: ['src/*.js', 'src/website/**'], + tasks: 'webpack:websiteDev' + }, + extensionSrc: { + files: ['src/*.js', 'src/extension/**'], + tasks: 'webpack:extensionDev' + }, + websiteImg: { + files: [ 'img/website/**' ], + tasks: 'copy:website' + }, + extensionImg: { + files: [ 'img/extension/**' ], + tasks: 'copy:extension' + }, + opensearch: { + files: 'opensearch.xml', + tasks: 'copy:website' }, assets: { files: [ - 'img/**', 'fonts/**', - 'assets/**', - 'opensearch.xml', 'node_modules/bootstrap/dist/css/bootstrap.min.css', 'node_modules/codemirror/lib/codemirror.css', 'node_modules/codemirror/addon/lint/lint.css', @@ -69,16 +132,71 @@ module.exports = grunt => { ], tasks: 'copy' }, - views: { - files: ['stylus/**', 'views/**'], - tasks: ['build-views'] + websiteViews: { + files: [ + 'stylus/*.styl', + 'stylus/website/**', + 'views/*.pug', + 'views/website/**' + ], + tasks: ['build-website-views'] + }, + extensionViews: { + files: [ + 'stylus/*.styl', + 'stylus/extension/**', + 'views/*.pug', + 'views/extension/**' + ], + tasks: ['build-extension-views'] } } }); - grunt.registerTask('build-views', ['stylus', 'pug']); - grunt.registerTask('build', ['clean', 'copy', 'build-views', 'webpack:prod']); - grunt.registerTask('build-dev', - ['clean', 'copy', 'build-views', 'webpack:dev']); + grunt.registerTask('build-website-views', [ + 'stylus:website', + 'pug:website' + ]); + + grunt.registerTask('build-extension-views', [ + 'stylus:extension', + 'pug:extension' + ]); + + grunt.registerTask('build-website', [ + 'clean:website', + 'copy:website', + 'build-website-views', + 'webpack:websiteProd' + ]); + + grunt.registerTask('build-website-dev', [ + 'clean:website', + 'copy:website', + 'build-website-views', + 'webpack:websiteDev' + ]); + + grunt.registerTask('build-extension', [ + 'clean:extension', + 'copy:extension', + 'build-extension-views', + 'webpack:extensionProd' + ]); + + grunt.registerTask('build-extension-dev', [ + 'clean:extension', + 'copy:extension', + 'build-extension-views', + 'webpack:extensionDev' + ]); + + grunt.registerTask('build', ['build-website', 'build-extension']); + + grunt.registerTask('build-dev', [ + 'build-website-dev', + 'build-extension-dev' + ]); + grunt.registerTask('default', ['build-dev', 'watch']); }; diff --git a/html/extension/bg.html b/html/extension/bg.html new file mode 100644 index 00000000..bd54434b --- /dev/null +++ b/html/extension/bg.html @@ -0,0 +1,3 @@ + + + diff --git a/img/bg_arrow_select.svg b/img/extension/bg_arrow_select.svg similarity index 100% rename from img/bg_arrow_select.svg rename to img/extension/bg_arrow_select.svg diff --git a/img/extension/debugger-logo.svg b/img/extension/debugger-logo.svg new file mode 100644 index 00000000..d416c0d4 --- /dev/null +++ b/img/extension/debugger-logo.svg @@ -0,0 +1,35 @@ + + + + Group 3 + Created with Sketch. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/img/favicon/android-icon-192x192.png b/img/extension/favicon/android-icon-192x192.png similarity index 100% rename from img/favicon/android-icon-192x192.png rename to img/extension/favicon/android-icon-192x192.png diff --git a/img/favicon/android-icon-48x48.png b/img/extension/favicon/android-icon-48x48.png similarity index 100% rename from img/favicon/android-icon-48x48.png rename to img/extension/favicon/android-icon-48x48.png diff --git a/img/favicon/favicon-16x16.png b/img/extension/favicon/favicon-16x16.png similarity index 100% rename from img/favicon/favicon-16x16.png rename to img/extension/favicon/favicon-16x16.png diff --git a/img/favicon/favicon-32x32.png b/img/extension/favicon/favicon-32x32.png similarity index 100% rename from img/favicon/favicon-32x32.png rename to img/extension/favicon/favicon-32x32.png diff --git a/img/favicon/favicon-96x96.png b/img/extension/favicon/favicon-96x96.png similarity index 100% rename from img/favicon/favicon-96x96.png rename to img/extension/favicon/favicon-96x96.png diff --git a/img/extension/favicon/icon-128x128.png b/img/extension/favicon/icon-128x128.png new file mode 100644 index 0000000000000000000000000000000000000000..543412b5e44906d5aeaeb17fec369d694061aa56 GIT binary patch literal 3551 zcmWkwcRUn+0R7(KjEpnNEbDSkoHH^LCubyFe#$u6Gdl_=D>5^Fh0IV!C=n@Sob0`4 z_TD0#m0!O<-g}?-{(hhLd69Ts4F)F@8S02D9)1z)$;A@?XDRQ>YDow9qNrwM=20oussio=fUhSnCu4) zmF4B-3CNN#L?*cJ4(u%tA;!NUMvIVtuvly&km2LwyAOD=fSrK?4uio!U>>+_0aWj! z=)@7U*8meso6L5t)EwBD1*=n4l9Lq@V_<&tv-kkW>H`^FV7LRMwx)|zfrwJ@?Nh|n zcYgc{z$qHUhJ(-m;Nf)dlHDCP!Vbi65a_f*G=cIBfRc#>5|4oh5Egm}gf3GH0&Y$T zz%_5_Ak)0pMc`0fZoZ;$-%+F*49?j^|j^YCGcwz6i$KViII^JkTX0mFaRBB z%@=DWkw~Dm7X14ie8>U08Q@7;N=izwV6qo)H260vGBOhQJ+|WV0-i3WoGwmIPFQAL zps&*dv^yZTft*$mxCz7*-U0=nC?`TE5d_2lTGR(zLn4vKZkuA3`xUCK}ao}JLlrEDd#z5`}Thb73Ukm7IPC-?Gx-X!xEKJQ&3u1)| zG7$wKqWPdW7Z9`PJTt+YB#`nF*oOnFV6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R;%mI-t}iHEMC#K>Xu~1=n|W&$?y9Z$zChwX@0W;=WLeWJ=K=KX=t zo&p}x(e@OpRgnf#BGx?g& z^T~F}15RHBeoPn{^DqmLl~QoNSH(-^N)^}@cOZOjyq)h%&;$tzmpcWfe}AhVD~h~o zswoz|BI{i{ali|jR)m;g-1tQ0{&gSkdB)f>Hd4Ro;v+l#^(PhL7L59a6I`xyJ^xbz zmm5&DsO%Z7%uJB+=@GJ@;(g!@%gN5=Y}D%mW0v7>!_@0$sIn!wxmB^lqk}WFxvX!gkVr}Y zg+sv}M=O?1!gf=YE5*(8am);f%c_d4Cf4c~R?AT&>6|^dwRrh1uRJgR)B7M|nr}%! zi0ku1u7Rya#eCafW`$Nt&C^VGG6Z}zEX%+4Lx7b?Q)rKX3Q~%%FmI3L@H|}o>{sOc zcnCw--sEu0^x8|wS~Dw5tlf6f;@?ZU&V_~;W&c!Td8YEDcX4jfa_Bm_ed>5$Q_OT# z8>P_g&OgUk4>pS&0>kc)6-Z7=^kq@F+M$YkJ?dz)MVyfl|Js4b<+i^@`iUhsg62uS z+wss{`?8iv?E57%UadSJEn+I4^;`Xm2XePh2WvEG)|GbZDul~99 zUfn_7UBNf`fOT3O2v@9$Bm1u^`Txl0|4)Hm$@1B+=bAyxZbAQC{&l|EAOH+*n;@#R H9V7n(Y9i%1 literal 0 HcmV?d00001 diff --git a/img/ico_logo.svg b/img/extension/ico_logo.svg similarity index 100% rename from img/ico_logo.svg rename to img/extension/ico_logo.svg diff --git a/img/extension/icon-chromeless.svg b/img/extension/icon-chromeless.svg new file mode 100644 index 00000000..81ab2ea8 --- /dev/null +++ b/img/extension/icon-chromeless.svg @@ -0,0 +1,29 @@ + + + + icon + Created with Sketch. + + + + + + + + + + + \ No newline at end of file diff --git a/assets/icon.svg b/img/extension/icon.svg similarity index 100% rename from assets/icon.svg rename to img/extension/icon.svg diff --git a/assets/logo.svg b/img/extension/logo.svg similarity index 100% rename from assets/logo.svg rename to img/extension/logo.svg diff --git a/img/extension/share-badge.svg b/img/extension/share-badge.svg new file mode 100644 index 00000000..9ca0beca --- /dev/null +++ b/img/extension/share-badge.svg @@ -0,0 +1,33 @@ + + + + badge + Created with Sketch. + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/img/1.svg b/img/website/1.svg similarity index 100% rename from img/1.svg rename to img/website/1.svg diff --git a/img/10.svg b/img/website/10.svg similarity index 100% rename from img/10.svg rename to img/website/10.svg diff --git a/img/11.svg b/img/website/11.svg similarity index 100% rename from img/11.svg rename to img/website/11.svg diff --git a/img/12.svg b/img/website/12.svg similarity index 100% rename from img/12.svg rename to img/website/12.svg diff --git a/img/13.svg b/img/website/13.svg similarity index 100% rename from img/13.svg rename to img/website/13.svg diff --git a/img/14.svg b/img/website/14.svg similarity index 100% rename from img/14.svg rename to img/website/14.svg diff --git a/img/15.svg b/img/website/15.svg similarity index 100% rename from img/15.svg rename to img/website/15.svg diff --git a/img/16.svg b/img/website/16.svg similarity index 100% rename from img/16.svg rename to img/website/16.svg diff --git a/img/17.svg b/img/website/17.svg similarity index 100% rename from img/17.svg rename to img/website/17.svg diff --git a/img/18.svg b/img/website/18.svg similarity index 100% rename from img/18.svg rename to img/website/18.svg diff --git a/img/19.svg b/img/website/19.svg similarity index 100% rename from img/19.svg rename to img/website/19.svg diff --git a/img/2.svg b/img/website/2.svg similarity index 100% rename from img/2.svg rename to img/website/2.svg diff --git a/img/20.svg b/img/website/20.svg similarity index 100% rename from img/20.svg rename to img/website/20.svg diff --git a/img/21.svg b/img/website/21.svg similarity index 100% rename from img/21.svg rename to img/website/21.svg diff --git a/img/22.svg b/img/website/22.svg similarity index 100% rename from img/22.svg rename to img/website/22.svg diff --git a/img/23.svg b/img/website/23.svg similarity index 100% rename from img/23.svg rename to img/website/23.svg diff --git a/img/24.svg b/img/website/24.svg similarity index 100% rename from img/24.svg rename to img/website/24.svg diff --git a/img/25.svg b/img/website/25.svg similarity index 100% rename from img/25.svg rename to img/website/25.svg diff --git a/img/3.svg b/img/website/3.svg similarity index 100% rename from img/3.svg rename to img/website/3.svg diff --git a/img/4.svg b/img/website/4.svg similarity index 100% rename from img/4.svg rename to img/website/4.svg diff --git a/img/5.svg b/img/website/5.svg similarity index 100% rename from img/5.svg rename to img/website/5.svg diff --git a/img/6.svg b/img/website/6.svg similarity index 100% rename from img/6.svg rename to img/website/6.svg diff --git a/img/7.svg b/img/website/7.svg similarity index 100% rename from img/7.svg rename to img/website/7.svg diff --git a/img/8.svg b/img/website/8.svg similarity index 100% rename from img/8.svg rename to img/website/8.svg diff --git a/img/9.svg b/img/website/9.svg similarity index 100% rename from img/9.svg rename to img/website/9.svg diff --git a/assets/badge-compatible.svg b/img/website/badge-compatible.svg similarity index 100% rename from assets/badge-compatible.svg rename to img/website/badge-compatible.svg diff --git a/assets/badge.svg b/img/website/badge.svg similarity index 100% rename from assets/badge.svg rename to img/website/badge.svg diff --git a/img/bg_arrow.svg b/img/website/bg_arrow.svg similarity index 100% rename from img/bg_arrow.svg rename to img/website/bg_arrow.svg diff --git a/img/website/bg_arrow_select.svg b/img/website/bg_arrow_select.svg new file mode 100644 index 00000000..1be940ac --- /dev/null +++ b/img/website/bg_arrow_select.svg @@ -0,0 +1,14 @@ + + + + Path 34 + Created with Sketch. + + + + + + + + + \ No newline at end of file diff --git a/img/bg_steps.svg b/img/website/bg_steps.svg similarity index 100% rename from img/bg_steps.svg rename to img/website/bg_steps.svg diff --git a/img/facebook-card.png b/img/website/facebook-card.png similarity index 100% rename from img/facebook-card.png rename to img/website/facebook-card.png diff --git a/img/favicon/android-icon-144x144.png b/img/website/favicon/android-icon-144x144.png similarity index 100% rename from img/favicon/android-icon-144x144.png rename to img/website/favicon/android-icon-144x144.png diff --git a/img/favicon/apple-icon-precomposed.png b/img/website/favicon/android-icon-192x192.png similarity index 100% rename from img/favicon/apple-icon-precomposed.png rename to img/website/favicon/android-icon-192x192.png diff --git a/img/favicon/android-icon-36x36.png b/img/website/favicon/android-icon-36x36.png similarity index 100% rename from img/favicon/android-icon-36x36.png rename to img/website/favicon/android-icon-36x36.png diff --git a/img/website/favicon/android-icon-48x48.png b/img/website/favicon/android-icon-48x48.png new file mode 100755 index 0000000000000000000000000000000000000000..31ec5b6d98832fe2785a2832e66bc95eb112b1b3 GIT binary patch literal 1395 zcmV-(1&sQMP){Qz75^ymWs0sy=7baZq8y7O3ASO5wN*gO9K1_;HzHF-{0Q=s@}IT+5nu)0Fa6L0a`~BR!&Y%rvN(u5*Q5)4H^Im(mDG0 z_xAw2^#JkZ-QC^T*w_Hl$crVW0IQ?`e4>XXp#gWB0H2q6A&>xterX$f0BBjx005UHyFewQyX8tGI;Q*}Q-rn8->D>UN*0V6y0NT$0pU(i($Nfzk z0L;Q)#=)2}!J;g{0Fk`_pSw-Kx|}Myx3{+dinIW_u>i8J611!Ugsih8tN^sDkSD6C zrl+W8)hje?&On6yrYg!m<08nUF7iMr-VebJ~09sY$0aLsL zPp<_|08vf05lzbiO+pV$$^l6`5J<-XNJd6Ro)tzg4LP3xIi3JH05&v;05Es}D=R4~ zQve<%0T3nu4oS`y1UYF&DZYf#g|TU5FN1kB$4R2ZoG%x+RerKPsz1 zTd~Z^s!=5c2*5O?tOt<$k0L5;h%gd3o@2yv*26(DQ#Q9R$dy2!NsM9jrc7)KG# zQg!XxRaw-Xu0uFgXCT)uV@xCd&vnoJLD|%X={M}cicX6s;GF;f002ovPDHLkV1i-f BQXK#Q literal 0 HcmV?d00001 diff --git a/img/favicon/android-icon-72x72.png b/img/website/favicon/android-icon-72x72.png similarity index 100% rename from img/favicon/android-icon-72x72.png rename to img/website/favicon/android-icon-72x72.png diff --git a/img/favicon/android-icon-96x96.png b/img/website/favicon/android-icon-96x96.png similarity index 100% rename from img/favicon/android-icon-96x96.png rename to img/website/favicon/android-icon-96x96.png diff --git a/img/favicon/apple-icon-114x114.png b/img/website/favicon/apple-icon-114x114.png similarity index 100% rename from img/favicon/apple-icon-114x114.png rename to img/website/favicon/apple-icon-114x114.png diff --git a/img/favicon/apple-icon-120x120.png b/img/website/favicon/apple-icon-120x120.png similarity index 100% rename from img/favicon/apple-icon-120x120.png rename to img/website/favicon/apple-icon-120x120.png diff --git a/img/favicon/apple-icon-144x144.png b/img/website/favicon/apple-icon-144x144.png similarity index 100% rename from img/favicon/apple-icon-144x144.png rename to img/website/favicon/apple-icon-144x144.png diff --git a/img/favicon/apple-icon-152x152.png b/img/website/favicon/apple-icon-152x152.png similarity index 100% rename from img/favicon/apple-icon-152x152.png rename to img/website/favicon/apple-icon-152x152.png diff --git a/img/favicon/apple-icon-180x180.png b/img/website/favicon/apple-icon-180x180.png similarity index 100% rename from img/favicon/apple-icon-180x180.png rename to img/website/favicon/apple-icon-180x180.png diff --git a/img/favicon/apple-icon-57x57.png b/img/website/favicon/apple-icon-57x57.png similarity index 100% rename from img/favicon/apple-icon-57x57.png rename to img/website/favicon/apple-icon-57x57.png diff --git a/img/favicon/apple-icon-60x60.png b/img/website/favicon/apple-icon-60x60.png similarity index 100% rename from img/favicon/apple-icon-60x60.png rename to img/website/favicon/apple-icon-60x60.png diff --git a/img/favicon/apple-icon-72x72.png b/img/website/favicon/apple-icon-72x72.png similarity index 100% rename from img/favicon/apple-icon-72x72.png rename to img/website/favicon/apple-icon-72x72.png diff --git a/img/favicon/apple-icon-76x76.png b/img/website/favicon/apple-icon-76x76.png similarity index 100% rename from img/favicon/apple-icon-76x76.png rename to img/website/favicon/apple-icon-76x76.png diff --git a/img/favicon/apple-icon.png b/img/website/favicon/apple-icon-precomposed.png similarity index 100% rename from img/favicon/apple-icon.png rename to img/website/favicon/apple-icon-precomposed.png diff --git a/img/website/favicon/apple-icon.png b/img/website/favicon/apple-icon.png new file mode 100755 index 0000000000000000000000000000000000000000..639aa125abc92efee62768e30583ca87c5cb5f9e GIT binary patch literal 4202 zcmZvgcRUsT_s8G&x);|qGqUfs_pHott;}rMo6O1znfF>r*T^QTYzmnb>3(c+BiBk< zktj04RT;m2|9_v4$LqXa=kYlIoIlP#=Yg4t9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&&E;RK6UjhNZ2$K(00z1yI*nSc G@&5<;u49-0 literal 0 HcmV?d00001 diff --git a/img/favicon/browserconfig.xml b/img/website/favicon/browserconfig.xml similarity index 100% rename from img/favicon/browserconfig.xml rename to img/website/favicon/browserconfig.xml diff --git a/img/website/favicon/favicon-16x16.png b/img/website/favicon/favicon-16x16.png new file mode 100755 index 0000000000000000000000000000000000000000..d8058a798cde4d907f92b7c8819afc7c8603f429 GIT binary patch literal 327 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbK}OMp*^E08{X_%K63maD5PgRXuF zgQf_Z00S5AL6c|e?Vd2af4tlH0mJfJ0&{M%KEAQ?`W1$Sml)>kxw&fBWSuP=l-IB} ztY+A>iec3%uBwtykwgZM7;o_y?bs+5=g992k+0bzHnWBAWOOm*cVN)7iPyHN<1*3U zHegWJ)n`}dl$0=H5aM9sWb^&13Uo)Er;B5V#O2;TSH1=Z0haV>qId4b{{L@3sa4=m z=dRMF{H*%}r+i1;_0`A<=n@7`S3j3^P66Vt30Q2XBgoOM6T1fyI$u;Z%^5y`p;Q-*(@&Q-?DmNPj zArKG{1_B5G1qT4V_5j4X0D*d78F2toYv=$|08B^#NJJ?MF?Ikc02m)t0384n6#x(s zDgX}<00z-G`0n!Y^6u^cwd=$+=K$*80O{QTHt#!JWBvMNW1|=uK_@+0X_geI{-X6o&h;-1}p#;95?_J z4gdvYBH&^G00DhTL_t(I%hi(QQo~RXMsISH5K^Zt)Jp|->TXas+}+*XT_2i+3^OU2 zK0wc}duPvlv$MOP0=cx?qh*WwGyqiyQVqbD0PwLKOP0*6P<+xF8+byjjTEU^AxS|g zKclclkR7@W1o4<|DER&jcx0ytqHY>NHv1s#xBe?CLjjpmCm}_%%}s|C)Cv>{uV29t zGJ~kt=38th!Y)q=N+a%GA=YZ(2%%b(M!bLeDwhk4XF?pqaqOHU$acqCP_(wYp83>t zVK~;<jN{R&Ib$N5?>u|q;tnvp_}fg zWx^@r2tlSPTzHkt$>loLju>UQ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~p!A92b?}&CE8?nLOvH20k z)41MgKAz7(ggJ?^CQR~xs<{QBeY!f;*+(d$87o|VVzYtt6Xm|m!a!tA8tHb)?dzFm9|>w-CLW+G+LMz=_p~k-SPCRR+$jtyo_aP z7e@+e%=KfM@%Fu)r&buwsAqSJc~gFpHi-u>kOnfS>+c2+aPP5rTHZAFZo{EUHMFg| zu71jyUl=ygh44E(b<-S0V=Bf#ZE;eP-V2NZ{-fJsaBs?P&WX|FYH<3JFx}#Cb}NQX z7qK~oZI_mhDd8tt(||X5!FAR&GDVbJE~M2$)BEOtVD6b>U8km+x>;Zp^Okl!!{N=vzu2FS6~U!E%D2KOa_W(Z z%K6|LuP0~yrN)h^<~bDn@A{^)PSt@RYYLc^eyBJh+#0A`SI>6WlL@YAMzKG{R)-#) zju34$%IaTDh&!efvxGk@eKwi-K5a!-XYJCOQ?-4NScz;@Y(ru1jXc0fj9M;Svls2% zH*w0Ofr1KlwP@b;2HPNF2ileAT%Q@bSPEJT;r__86V_EfdrI{!*KNJ%*klk)_A*C{ zBLSx}dZ>(KX*X6LZmvv16k;;k<)*R&RQFr02;BC1YYn`r$|E|6#^q4TIyZf&+U~{2 twc1syMw=zx%$yW@V{ + + + auth0-svg + Created with Sketch. + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/img/ico_question.svg b/img/website/ico_question.svg similarity index 100% rename from img/ico_question.svg rename to img/website/ico_question.svg diff --git a/img/ico_star.svg b/img/website/ico_star.svg similarity index 100% rename from img/ico_star.svg rename to img/website/ico_star.svg diff --git a/img/ico_status.svg b/img/website/ico_status.svg similarity index 100% rename from img/ico_status.svg rename to img/website/ico_status.svg diff --git a/img/ico_twitter.svg b/img/website/ico_twitter.svg similarity index 100% rename from img/ico_twitter.svg rename to img/website/ico_twitter.svg diff --git a/img/website/icon.svg b/img/website/icon.svg new file mode 100644 index 00000000..67ffc813 --- /dev/null +++ b/img/website/icon.svg @@ -0,0 +1,28 @@ + + + + Group + Created with Sketch. + + + + + \ No newline at end of file diff --git a/img/website/logo-asset.svg b/img/website/logo-asset.svg new file mode 100644 index 00000000..17252849 --- /dev/null +++ b/img/website/logo-asset.svg @@ -0,0 +1,27 @@ + + + + Group + Created with Sketch. + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/img/logo.svg b/img/website/logo.svg similarity index 100% rename from img/logo.svg rename to img/website/logo.svg diff --git a/img/pic_logo.svg b/img/website/pic_logo.svg similarity index 100% rename from img/pic_logo.svg rename to img/website/pic_logo.svg diff --git a/img/pic_logo2.svg b/img/website/pic_logo2.svg similarity index 100% rename from img/pic_logo2.svg rename to img/website/pic_logo2.svg diff --git a/img/pic_logo3.svg b/img/website/pic_logo3.svg similarity index 100% rename from img/pic_logo3.svg rename to img/website/pic_logo3.svg diff --git a/img/pic_logo4.svg b/img/website/pic_logo4.svg similarity index 100% rename from img/pic_logo4.svg rename to img/website/pic_logo4.svg diff --git a/img/pic_logo_ft.svg b/img/website/pic_logo_ft.svg similarity index 100% rename from img/pic_logo_ft.svg rename to img/website/pic_logo_ft.svg diff --git a/img/pic_tshirt.png b/img/website/pic_tshirt.png similarity index 100% rename from img/pic_tshirt.png rename to img/website/pic_tshirt.png diff --git a/img/pic_tshirt_b.png b/img/website/pic_tshirt_b.png similarity index 100% rename from img/pic_tshirt_b.png rename to img/website/pic_tshirt_b.png diff --git a/img/q.svg b/img/website/q.svg similarity index 100% rename from img/q.svg rename to img/website/q.svg diff --git a/img/twitter-card.png b/img/website/twitter-card.png similarity index 100% rename from img/twitter-card.png rename to img/website/twitter-card.png diff --git a/manifest.json b/manifest.json new file mode 100644 index 00000000..3a978123 --- /dev/null +++ b/manifest.json @@ -0,0 +1,43 @@ +{ + "manifest_version": 2, + + "name": "JWT Debugger", + "description": "The JWT.io debugger as a Chrome extension", + "version": "2.0.0", + + "browser_action": { + "default_icon": "img/favicon/favicon-96x96.png", + "default_popup": "index.html" + }, + + "background": { + "page": "bg.html" + }, + + "icons": { + "16": "img/favicon/favicon-16x16.png", + "32": "img/favicon/favicon-32x32.png", + "48": "img/favicon/android-icon-48x48.png", + "96": "img/favicon/favicon-96x96.png", + "192": "img/favicon/android-icon-192x192.png" + }, + + "commands": { + "_execute_browser_action": { + "suggested_key": { + "default": "Ctrl+Shift+K", + "mac": "Command+Shift+K", + "linux": "Ctrl+Shift+K" + } + } + }, + + "permissions": [ + "activeTab", + "", + "cookies", + "storage", + "clipboardRead", + "clipboardWrite" + ] +} diff --git a/src/dom-elements.js b/src/dom-elements.js new file mode 100644 index 00000000..3cd8ed72 --- /dev/null +++ b/src/dom-elements.js @@ -0,0 +1,31 @@ +export const encodedTabLink = + document.querySelector('.tab-link a[href="#encoded-jwt"]'); +export const decodedTabLink = + document.querySelector('.tab-link a[href="#decoded-jwt"]'); +export const encodedTabElement = document.getElementById('encoded-jwt'); +export const decodedTabElement = document.getElementById('decoded-jwt'); +export const editorElement = document.querySelector('#encoded-jwt .input'); +export const decodedElement = document.querySelector('#decoded-jwt .output'); +export const headerElement = document.querySelector('.js-header'); +export const payloadElement = document.querySelector('.js-payload'); +export const payloadTooltipElement = + document.getElementById('js-payload-tooltip'); + +export const signatureStatusElement = + document.querySelector('.validation-status.js-signature'); + +export const algorithmSelect = document.getElementById('algorithm-select'); + +export const keyEditorContainer = document.querySelector('.jwt-signature pre.RS256'); +export const rsaShaTextSpan = document.getElementById('rsasha-text'); +export const secretEditorContainer = document.querySelector('.jwt-signature pre.HS256'); +export const hmacShaTextSpan = document.getElementById('hmacsha-text'); + +export const publicKeyTextArea = + document.querySelector('.jwt-signature textarea[name="public-key"]'); +export const privateKeyTextArea = + document.querySelector('.jwt-signature textarea[name="private-key"]'); +export const secretInput = + document.querySelector('.jwt-signature input[name="secret"]'); +export const secretBase64Checkbox = + document.getElementById('is-base64-encoded'); diff --git a/src/default-tokens.js b/src/editor/default-tokens.js similarity index 100% rename from src/default-tokens.js rename to src/editor/default-tokens.js diff --git a/src/website/editor/event-manager.js b/src/editor/event-manager.js similarity index 100% rename from src/website/editor/event-manager.js rename to src/editor/event-manager.js diff --git a/src/website/editor/index.js b/src/editor/index.js similarity index 97% rename from src/website/editor/index.js rename to src/editor/index.js index 22aaeab5..6067c952 100644 --- a/src/website/editor/index.js +++ b/src/editor/index.js @@ -1,6 +1,5 @@ -import { copyTextToClipboard } from '../utils.js'; -import { deferToNextLoop } from '../../utils.js'; -import { downloadPublicKeyIfPossible } from '../../public-key-download.js'; +import { copyTextToClipboard, deferToNextLoop } from '../utils.js'; +import { downloadPublicKeyIfPossible } from './public-key-download.js'; import { tooltipHandler } from './tooltip.js'; import { tokenEditor, headerEditor, payloadEditor } from './instances.js'; import { @@ -9,10 +8,10 @@ import { stringify, fixEditorHeight } from './utils.js'; -import { sign, verify, decode } from '../../jwt.js'; +import { sign, verify, decode } from './jwt.js'; import EventManager from './event-manager.js'; import strings from '../strings.js'; -import defaultTokens from '../../default-tokens.js'; +import defaultTokens from './default-tokens.js'; import { algorithmSelect, signatureStatusElement, diff --git a/src/website/editor/instances.js b/src/editor/instances.js similarity index 100% rename from src/website/editor/instances.js rename to src/editor/instances.js diff --git a/src/website/editor/jwt-mode.js b/src/editor/jwt-mode.js similarity index 100% rename from src/website/editor/jwt-mode.js rename to src/editor/jwt-mode.js diff --git a/src/jwt.js b/src/editor/jwt.js similarity index 100% rename from src/jwt.js rename to src/editor/jwt.js diff --git a/src/public-key-download.js b/src/editor/public-key-download.js similarity index 98% rename from src/public-key-download.js rename to src/editor/public-key-download.js index de2ab508..afb748d0 100644 --- a/src/public-key-download.js +++ b/src/editor/public-key-download.js @@ -1,4 +1,4 @@ -import { httpGet } from './utils.js'; +import { httpGet } from '../utils.js'; function getKeyFromX5c(x5c) { if(!x5c) { diff --git a/src/website/editor/tooltip.js b/src/editor/tooltip.js similarity index 100% rename from src/website/editor/tooltip.js rename to src/editor/tooltip.js diff --git a/src/website/editor/utils.js b/src/editor/utils.js similarity index 100% rename from src/website/editor/utils.js rename to src/editor/utils.js diff --git a/src/extension/dom-elements.js b/src/extension/dom-elements.js new file mode 100644 index 00000000..1d0afd1c --- /dev/null +++ b/src/extension/dom-elements.js @@ -0,0 +1 @@ +export * from '../dom-elements.js'; \ No newline at end of file diff --git a/src/extension/index.js b/src/extension/index.js new file mode 100644 index 00000000..3d889638 --- /dev/null +++ b/src/extension/index.js @@ -0,0 +1,44 @@ +import { + setupTokenEditor, + setTokenEditorValue, + useDefaultToken +} from '../editor'; +import { getParameterByName } from '../utils.js'; +import { publicKeyTextArea } from './dom-elements.js'; + +/* For initialization, look at the end of this file */ + +function parseLocationQuery() { + const publicKey = getParameterByName('publicKey'); + const value = getParameterByName('value'); + const token = getParameterByName('token'); + + if(publicKey) { + publicKeyTextArea.value = publicKey; + } + if(value) { + setTokenEditorValue(value); + } + if(token) { + setTokenEditorValue(token); + } +} + +function loadToken() { + const lastToken = localStorage.getItem('lastToken'); + if(lastToken) { + setTokenEditorValue(value); + + const lastPublicKey = localStorage.getItem('lastPublicKey'); + if(lastPublicKey) { + publicKeyTextArea.value = lastPublicKey; + } + } else { + useDefaultToken('HS256'); + } +} + +// Initialization +setupTokenEditor(); +loadToken(); +parseLocationQuery(); diff --git a/src/website/strings.js b/src/strings.js similarity index 100% rename from src/website/strings.js rename to src/strings.js diff --git a/src/utils.js b/src/utils.js index b1cf7699..c11a502f 100644 --- a/src/utils.js +++ b/src/utils.js @@ -104,3 +104,82 @@ export function isValidKey(key) { export function deferToNextLoop(func) { setTimeout(func, 1); } + +// https://stackoverflow.com/questions/400212/how-do-i-copy-to-the-clipboard-in-javascript +export function copyTextToClipboard(text) { + var textArea = document.createElement("textarea"); + + // + // *** This styling is an extra step which is likely not required. *** + // + // Why is it here? To ensure: + // 1. the element is able to have focus and selection. + // 2. if element was to flash render it has minimal visual impact. + // 3. less flakyness with selection and copying which **might** occur if + // the textarea element is not visible. + // + // The likelihood is the element won't even render, not even a flash, + // so some of these are just precautions. However in IE the element + // is visible whilst the popup box asking the user for permission for + // the web page to copy to the clipboard. + // + + // Place in top-left corner of screen regardless of scroll position. + textArea.style.position = 'fixed'; + textArea.style.top = 0; + textArea.style.left = 0; + + // Ensure it has a small width and height. Setting to 1px / 1em + // doesn't work as this gives a negative w/h on some browsers. + textArea.style.width = '2em'; + textArea.style.height = '2em'; + + // We don't need padding, reducing the size if it does flash render. + textArea.style.padding = 0; + + // Clean up any borders. + textArea.style.border = 'none'; + textArea.style.outline = 'none'; + textArea.style.boxShadow = 'none'; + + // Avoid flash of white box if rendered for any reason. + textArea.style.background = 'transparent'; + + textArea.value = text; + + document.body.appendChild(textArea); + + textArea.select(); + + try { + document.execCommand('copy'); + } catch (err) { + console.error(err); + } + + document.body.removeChild(textArea); +} + +// https://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript +export function getParameterByName(name, url) { + if(!url) { + url = window.location.href; + } + + name = name.replace(/[\[\]]/g, "\\$&"); + + const regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"); + const results = regex.exec(url); + if(!results) { + return null; + } + if(!results[2]) { + return ''; + } + + return decodeURIComponent(results[2].replace(/\+/g, " ")); +} + +export function isWideScreen() { + return window.matchMedia('(min-width: 768px)').matches; +} diff --git a/src/website/dom-elements.js b/src/website/dom-elements.js index 21b64213..53929903 100644 --- a/src/website/dom-elements.js +++ b/src/website/dom-elements.js @@ -1,3 +1,5 @@ +export * from '../dom-elements.js'; + export const navbarElement = document.querySelector('nav.navbar'); export const menuTriggerElement = document.querySelector('.menu-trigger'); export const menuLinks = document.querySelectorAll('.navbar .menu a'); @@ -18,38 +20,6 @@ export const codeElements = document.querySelectorAll('.plain-text pre code'); export const debuggerSection = document.getElementById('debugger-io'); -export const encodedTabLink = - document.querySelector('.tab-link a[href="#encoded-jwt"]'); -export const decodedTabLink = - document.querySelector('.tab-link a[href="#decoded-jwt"]'); -export const encodedTabElement = document.getElementById('encoded-jwt'); -export const decodedTabElement = document.getElementById('decoded-jwt'); -export const editorElement = document.querySelector('#encoded-jwt .input'); -export const decodedElement = document.querySelector('#decoded-jwt .output'); -export const headerElement = document.querySelector('.js-header'); -export const payloadElement = document.querySelector('.js-payload'); -export const payloadTooltipElement = - document.getElementById('js-payload-tooltip'); - -export const signatureStatusElement = - document.querySelector('.validation-status.js-signature'); - -export const algorithmSelect = document.getElementById('algorithm-select'); - -export const keyEditorContainer = document.querySelector('.jwt-signature pre.RS256'); -export const rsaShaTextSpan = document.getElementById('rsasha-text'); -export const secretEditorContainer = document.querySelector('.jwt-signature pre.HS256'); -export const hmacShaTextSpan = document.getElementById('hmacsha-text'); - -export const publicKeyTextArea = - document.querySelector('.jwt-signature textarea[name="public-key"]'); -export const privateKeyTextArea = - document.querySelector('.jwt-signature textarea[name="private-key"]'); -export const secretInput = - document.querySelector('.jwt-signature input[name="secret"]'); -export const secretBase64Checkbox = - document.getElementById('is-base64-encoded'); - export const starsElements = document.getElementsByClassName('stars'); export const librariesElement = document.querySelector('.libraries-sv'); export const librariesSelect = document.getElementById('libraries-select'); diff --git a/src/website/extension.js b/src/website/extension.js index c63140c6..9084ea11 100644 --- a/src/website/extension.js +++ b/src/website/extension.js @@ -1,5 +1,5 @@ import { extensionButton, extensionButtonText } from './dom-elements.js'; -import strings from './strings.js'; +import strings from '../strings.js'; // https://stackoverflow.com/questions/4565112/javascript-how-to-find-out-if-the-user-browser-is-chrome function isChrome() { diff --git a/src/website/index.js b/src/website/index.js index 5eb3aa99..8777ab33 100644 --- a/src/website/index.js +++ b/src/website/index.js @@ -5,11 +5,11 @@ import { setupTokenEditor, setTokenEditorValue, useDefaultToken -} from './editor'; +} from '../editor'; import { setupJwtCounter } from './counter.js'; import { setupSmoothScrolling } from './smooth-scrolling.js'; import { setupHighlighting } from './highlighting.js'; -import { getParameterByName, smoothScrollTo } from './utils.js'; +import { getParameterByName } from '../utils.js'; import { publicKeyTextArea, codeElements, diff --git a/src/website/smooth-scrolling.js b/src/website/smooth-scrolling.js index c9d02c0c..c3aca1a5 100644 --- a/src/website/smooth-scrolling.js +++ b/src/website/smooth-scrolling.js @@ -1,5 +1,5 @@ import { menuScrollableLinks, navbarElement } from './dom-elements.js'; -import { isWideScreen } from './utils.js'; +import { isWideScreen } from '../utils.js'; import $ from 'jquery'; diff --git a/src/website/utils.js b/src/website/utils.js index 79cdfdec..3bb573db 100644 --- a/src/website/utils.js +++ b/src/website/utils.js @@ -7,81 +7,6 @@ export function safeLocalStorageSetItem(key, value) { } } -// https://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript -export function getParameterByName(name, url) { - if(!url) { - url = window.location.href; - } - - name = name.replace(/[\[\]]/g, "\\$&"); - - const regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"); - const results = regex.exec(url); - if(!results) { - return null; - } - if(!results[2]) { - return ''; - } - - return decodeURIComponent(results[2].replace(/\+/g, " ")); -} - -// https://stackoverflow.com/questions/400212/how-do-i-copy-to-the-clipboard-in-javascript -export function copyTextToClipboard(text) { - var textArea = document.createElement("textarea"); - - // - // *** This styling is an extra step which is likely not required. *** - // - // Why is it here? To ensure: - // 1. the element is able to have focus and selection. - // 2. if element was to flash render it has minimal visual impact. - // 3. less flakyness with selection and copying which **might** occur if - // the textarea element is not visible. - // - // The likelihood is the element won't even render, not even a flash, - // so some of these are just precautions. However in IE the element - // is visible whilst the popup box asking the user for permission for - // the web page to copy to the clipboard. - // - - // Place in top-left corner of screen regardless of scroll position. - textArea.style.position = 'fixed'; - textArea.style.top = 0; - textArea.style.left = 0; - - // Ensure it has a small width and height. Setting to 1px / 1em - // doesn't work as this gives a negative w/h on some browsers. - textArea.style.width = '2em'; - textArea.style.height = '2em'; - - // We don't need padding, reducing the size if it does flash render. - textArea.style.padding = 0; - - // Clean up any borders. - textArea.style.border = 'none'; - textArea.style.outline = 'none'; - textArea.style.boxShadow = 'none'; - - // Avoid flash of white box if rendered for any reason. - textArea.style.background = 'transparent'; - - textArea.value = text; - - document.body.appendChild(textArea); - - textArea.select(); - - try { - document.execCommand('copy'); - } catch (err) { - console.error(err); - } - - document.body.removeChild(textArea); -} - export function getOffsetBoundingClientRect(element) { const rect = element.getBoundingClientRect(); @@ -103,7 +28,3 @@ export function isInViewport(elem) { bounding.right <= (window.innerWidth || document.documentElement.clientWidth) ); }; - -export function isWideScreen() { - return window.matchMedia('(min-width: 768px)').matches; -} diff --git a/stylus/extension/index.styl b/stylus/extension/index.styl new file mode 100644 index 00000000..e066622c --- /dev/null +++ b/stylus/extension/index.styl @@ -0,0 +1,167 @@ +@import '../website/index' + +.container + width 800px + +.jwt-clipboard-btn + background #000 + display inline-block + padding 6px 6px + padding-left 15px + color #fff !important + text-decoration none !important + border-radius 20px + text-transform uppercase + font-size 12px + letter-spacing .5px + position relative + line-height 28px + padding-right 40px + width 190px + text-align center + + &:hover + opacity: 0.85 + + img + position absolute + top 7px + right 7px + +.h-block + display inline-block; + + & + .h-block + margin-left: 15px; + +.tab-link small + zoom .8 + +.jwt-playground + padding-top 12px + + .save-back + color #0094c1 + margin-left 15px + + .colophon, + .validation-status + zoom .8 + + .colophon + margin-top 12px + margin-bottom 12px + position relative + + .share-callouts + margin-left 20px + + svg + position relative + top 5px + margin-left 4px + + a + text-decoration none + color currentColor + + .top-section + margin-bottom 18px + zoom .8 + + a + outline none + + .keyboard-info + display inline-block + margin-left 20px + opacity 0.5 + //line-height 37px + + .algorithm + text-align right + + .validation-status + margin-top 20px + + .algorithm-code + margin-top 0px + + .tab-content + .jwt-explained + .text-line + zoom .8 + pre + font-size 11px + line-height 1.5 + padding 0 + .CodeMirror-wrap, + .pre-encode + min-height 105px + padding: 8px + .input + padding 10px + + .tab-nav + margin-bottom 10px + + a + font-size 16px + +.custom-select + display inline-block + position relative + select + background white + width 100px + height 38px + font-size 12px + padding 0 10px + border 1px solid #D8D8D8 + border-radius 3px + -webkit-appearance none + -moz-appearance none + appearance none + outline 0 + &::-ms-expand + display none + + &:before + content "" + background white + height 34px + width 23px + display block + position absolute + right 2px + top 1px + pointer-events none + + &:after + background url(/img/bg_arrow_select.svg) no-repeat + width 8px + height 6px + content '' + display inline-block + position absolute + top 16px + right 10px + pointer-events none + +.select-field + .select-field + margin-right 15px + +.select-field + text-align center + span + font-weight bold + text-transform uppercase + font-size 12px + vertical-align middle + .custom-select + margin-left 10px + +section + padding 15px 0 0 0 + +breakpoint("tablet") + padding 0px 0 diff --git a/stylus/codemirror.styl b/stylus/website/codemirror.styl similarity index 100% rename from stylus/codemirror.styl rename to stylus/website/codemirror.styl diff --git a/stylus/flip-clock.styl b/stylus/website/flip-clock.styl similarity index 100% rename from stylus/flip-clock.styl rename to stylus/website/flip-clock.styl diff --git a/stylus/highlight.styl b/stylus/website/highlight.styl similarity index 100% rename from stylus/highlight.styl rename to stylus/website/highlight.styl diff --git a/stylus/app.styl b/stylus/website/index.styl similarity index 100% rename from stylus/app.styl rename to stylus/website/index.styl diff --git a/stylus/mixins.styl b/stylus/website/mixins.styl similarity index 100% rename from stylus/mixins.styl rename to stylus/website/mixins.styl diff --git a/views/extension/index.pug b/views/extension/index.pug index ecc0f4d3..bbf6932e 100644 --- a/views/extension/index.pug +++ b/views/extension/index.pug @@ -1,3 +1,48 @@ extends layout -include ../token-editor.pug +block content + + section#debugger-io.debugger-jwt + .container + .jwt-playground + .top-section.clearfix + + .pull-left + .jwt-logo.h-block + img(src="/img/debugger-logo.svg" height="33" alt="Share this jwt") + + .pull-right + .select-field.h-block + span Open JWT from + .custom-select + select + optgroup + option(name='0', selected) + optgroup(label="Web Storage") + optgroup(label="Cookies") + + .select-field.algorithm.h-block + span Algorithm + .jwt-select.custom-select + include ../token-editor-algorithms.pug + + .share-this-jwt.h-block + a.jwt-clipboard-btn(href="#") + span#share-this-jwt-text Share this JWT + img(src="/img/icon-chromeless.svg" height="25" alt="Share this jwt") + + include ../token-editor-common.pug + + .colophon.clearfix + .pull-left + a(target="_blank" href="https://auth0.com/?utm_source=jwt-ext&utm_campaign=badge") + | Supported by + img(src="/img/ico_logo.svg") + + .pull-right.save-back.hide + a(href="#") Save back to localStorage + + .pull-right.keyboard-info + span Press Ctrl + Shift + K to open the JWT debugger + + script(src='/js/index.js') diff --git a/views/extension/layout.pug b/views/extension/layout.pug index 8e8f5729..6bb79645 100644 --- a/views/extension/layout.pug +++ b/views/extension/layout.pug @@ -3,7 +3,6 @@ html(lang='en') head include ../title.pug include ../stylesheets.pug - include ../icons.pug body block content diff --git a/views/stylesheets.pug b/views/stylesheets.pug index e421daaa..5dfda206 100644 --- a/views/stylesheets.pug +++ b/views/stylesheets.pug @@ -3,4 +3,4 @@ link(rel="stylesheet", href="/css/bootstrap.min.css") link(rel='stylesheet', href='/css/codemirror.css', type='text/css', media='all') link(rel='stylesheet', href='/css/lint.css', type='text/css', media='all') link(rel="stylesheet", href='/css/budicon.css', type="text/css", media="all") -link(rel='stylesheet', href='/css/app.css', type='text/css', media='all') +link(rel='stylesheet', href='/css/index.css', type='text/css', media='all') diff --git a/views/website/assets.pug b/views/website/assets.pug index 46f88eef..c04b9c0e 100644 --- a/views/website/assets.pug +++ b/views/website/assets.pug @@ -4,35 +4,35 @@ section.sources .column.badges h2 Badges .hold - a(href='http://jwt.io/assets/badge.svg', target='_blank') - img(src='assets/badge.svg') + a(href='http://jwt.io/img/badge.svg', target='_blank') + img(src='img/badge.svg') .text-hold - a(href='http://jwt.io/assets/badge.svg', target='_blank') + a(href='http://jwt.io/img/badge.svg', target='_blank') i.icon-budicon-722 - p http://jwt.io/assets/badge.svg + p http://jwt.io/img/badge.svg .hold - a(href='http://jwt.io/assets/badge-compatible.svg', target='_blank') - img(src='assets/badge-compatible.svg') + a(href='http://jwt.io/img/badge-compatible.svg', target='_blank') + img(src='img/badge-compatible.svg') .text-hold - a(href='http://jwt.io/assets/badge-compatible.svg', target='_blank') + a(href='http://jwt.io/img/badge-compatible.svg', target='_blank') i.icon-budicon-722 - p http://jwt.io/assets/badge-compatible.svg + p http://jwt.io/img/badge-compatible.svg .column.logotype h2 Logotype .hold - a(href='http://jwt.io/assets/icon.svg', target='_blank') - img(src='assets/icon.svg') + a(href='http://jwt.io/img/icon.svg', target='_blank') + img(src='img/icon.svg') .text-hold - a(href='http://jwt.io/assets/icon.svg', target='_blank') + a(href='http://jwt.io/img/icon.svg', target='_blank') i.icon-budicon-722 - p http://jwt.io/assets/icon.svg + p http://jwt.io/img/icon.svg .hold - a(href='http://jwt.io/assets/logo.svg', target='_blank') - img(src='assets/logo.svg') + a(href='http://jwt.io/img/logo-asset.svg', target='_blank') + img(src='img/logo-asset.svg') .text-hold - a(href='http://jwt.io/assets/logo.svg', target='_blank') + a(href='http://jwt.io/img/logo-asset.svg', target='_blank') i.icon-budicon-722 - p http://jwt.io/assets/logo.svg + p http://jwt.io/img/logo-asset.svg .column.tshirt h2 Store img(src='img/pic_tshirt.png') diff --git a/webpack.common.js b/webpack.common.js new file mode 100644 index 00000000..44416901 --- /dev/null +++ b/webpack.common.js @@ -0,0 +1,30 @@ +const webpack = require('webpack'); + +module.exports = { + devtool: 'source-map', + module: { + rules: [{ + test: /\.js$/, + exclude: /(node_modules|bower_components)/, + use: { + loader: 'babel-loader', + options: { + presets: [[ + '@babel/preset-env', { + targets: { + browsers: ["last 5 versions", "safari >= 7"] + }, + modules: false + } + ]] + } + } + }] + }, + plugins: [ + new webpack.ProvidePlugin({ + $: "jquery", + jQuery: "jquery" + }) + ] +}; \ No newline at end of file diff --git a/webpack.extension-dev.js b/webpack.extension-dev.js new file mode 100644 index 00000000..3727c070 --- /dev/null +++ b/webpack.extension-dev.js @@ -0,0 +1,13 @@ +const merge = require('webpack-merge'); + +const common = require('./webpack.common.js'); + +module.exports = merge(common, { + entry: { + index: './src/extension/index.js', + }, + output: { + filename: '[name].js', + path: __dirname + '/dist/extension/js' + } +}); diff --git a/webpack.extension-prod.js b/webpack.extension-prod.js new file mode 100644 index 00000000..a9c4eefb --- /dev/null +++ b/webpack.extension-prod.js @@ -0,0 +1,10 @@ +const merge = require('webpack-merge'); +const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); + +const devConfig = require('./webpack.extension-dev.js'); + +module.exports = merge(devConfig, { + plugins: [ + new UglifyJsPlugin() + ] +}); diff --git a/webpack.website-dev.js b/webpack.website-dev.js index a4c0777f..a43c6992 100644 --- a/webpack.website-dev.js +++ b/webpack.website-dev.js @@ -1,7 +1,8 @@ -const webpack = require('webpack'); +const merge = require('webpack-merge'); -module.exports = { - devtool: 'source-map', +const common = require('./webpack.common.js'); + +module.exports = merge(common, { entry: { index: './src/website/index.js', introduction: './src/website/introduction/index.js' @@ -9,30 +10,5 @@ module.exports = { output: { filename: '[name].js', path: __dirname + '/dist/website/js' - }, - module: { - rules: [{ - test: /\.js$/, - exclude: /(node_modules|bower_components)/, - use: { - loader: 'babel-loader', - options: { - presets: [[ - '@babel/preset-env', { - targets: { - browsers: ["last 5 versions", "safari >= 7"] - }, - modules: false - } - ]] - } - } - }] - }, - plugins: [ - new webpack.ProvidePlugin({ - $: "jquery", - jQuery: "jquery" - }) - ] -}; + } +}); diff --git a/webpack.website-prod.js b/webpack.website-prod.js index d82e97f7..945d4122 100644 --- a/webpack.website-prod.js +++ b/webpack.website-prod.js @@ -1,4 +1,3 @@ -const webpack = require('webpack'); const merge = require('webpack-merge'); const UglifyJsPlugin = require('uglifyjs-webpack-plugin');