extension-create 2.0.0-alpha.23 → 2.0.0-alpha.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.js +3 -3
- package/dist/test-template-action/README.md +35 -0
- package/dist/test-template-action/action/index.html +40 -0
- package/dist/test-template-action/action/scripts.js +11 -0
- package/dist/test-template-action/action/styles.css +23 -0
- package/dist/test-template-action/images/extension_128.png +0 -0
- package/dist/test-template-action/images/extension_16.png +0 -0
- package/dist/test-template-action/images/extension_48.png +0 -0
- package/dist/test-template-action/manifest.json +21 -0
- package/dist/test-template-action/package.json +21 -0
- package/dist/test-template-action-chatgpt/.env.example +1 -0
- package/dist/test-template-action-chatgpt/README.md +35 -0
- package/dist/test-template-action-chatgpt/action/ActionApp.tsx +118 -0
- package/dist/test-template-action-chatgpt/action/index.html +13 -0
- package/dist/test-template-action-chatgpt/action/scripts.tsx +12 -0
- package/dist/test-template-action-chatgpt/action/styles.css +8 -0
- package/dist/test-template-action-chatgpt/images/chatgpt.png +0 -0
- package/dist/test-template-action-chatgpt/images/extension.png +0 -0
- package/dist/test-template-action-chatgpt/images/extension_128.png +0 -0
- package/dist/test-template-action-chatgpt/images/extension_16.png +0 -0
- package/dist/test-template-action-chatgpt/images/extension_48.png +0 -0
- package/dist/test-template-action-chatgpt/manifest.json +21 -0
- package/dist/test-template-action-chatgpt/package.json +30 -0
- package/dist/test-template-action-chatgpt/postcss.config.js +6 -0
- package/dist/test-template-action-chatgpt/tailwind.config.js +8 -0
- package/dist/test-template-action-chatgpt/tsconfig.json +22 -0
- package/dist/test-template-config-babel/README.md +35 -0
- package/dist/test-template-config-babel/babel.config.json +4 -0
- package/dist/test-template-config-babel/extension.config.js +17 -0
- package/dist/test-template-config-babel/images/babel.png +0 -0
- package/dist/test-template-config-babel/images/extension_128.png +0 -0
- package/dist/test-template-config-babel/images/extension_16.png +0 -0
- package/dist/test-template-config-babel/images/extension_48.png +0 -0
- package/dist/test-template-config-babel/manifest.json +15 -0
- package/dist/test-template-config-babel/newtab/index.html +40 -0
- package/dist/test-template-config-babel/newtab/scripts.js +11 -0
- package/dist/test-template-config-babel/newtab/styles.css +22 -0
- package/dist/test-template-config-babel/package.json +24 -0
- package/dist/test-template-config-stylelint/.stylelintrc.json +3 -0
- package/dist/test-template-config-stylelint/README.md +35 -0
- package/dist/test-template-config-stylelint/images/extension_128.png +0 -0
- package/dist/test-template-config-stylelint/images/extension_16.png +0 -0
- package/dist/test-template-config-stylelint/images/extension_48.png +0 -0
- package/dist/test-template-config-stylelint/images/stylelint.svg +1 -0
- package/dist/test-template-config-stylelint/manifest.json +15 -0
- package/dist/test-template-config-stylelint/newtab/index.html +40 -0
- package/dist/test-template-config-stylelint/newtab/scripts.js +11 -0
- package/dist/test-template-config-stylelint/newtab/styles.scss +20 -0
- package/dist/test-template-config-stylelint/package.json +24 -0
- package/dist/test-template-content/README.md +35 -0
- package/dist/test-template-content/background.js +21 -0
- package/dist/test-template-content/content/scripts.js +32 -0
- package/dist/test-template-content/content/styles.css +54 -0
- package/dist/test-template-content/images/extension_128.png +0 -0
- package/dist/test-template-content/images/extension_16.png +0 -0
- package/dist/test-template-content/images/extension_48.png +0 -0
- package/dist/test-template-content/manifest.json +35 -0
- package/dist/test-template-content/package.json +20 -0
- package/dist/test-template-content-css-module/README.md +35 -0
- package/dist/test-template-content-css-module/background.js +21 -0
- package/dist/test-template-content-css-module/content/Logo.module.css +11 -0
- package/dist/test-template-content-css-module/content/scripts.js +33 -0
- package/dist/test-template-content-css-module/content/styles.css +40 -0
- package/dist/test-template-content-css-module/images/extension_128.png +0 -0
- package/dist/test-template-content-css-module/images/extension_16.png +0 -0
- package/dist/test-template-content-css-module/images/extension_48.png +0 -0
- package/dist/test-template-content-css-module/manifest.json +35 -0
- package/dist/test-template-content-css-module/package.json +20 -0
- package/dist/test-template-content-extension-config/README.md +35 -0
- package/dist/test-template-content-extension-config/background.ts +1 -0
- package/dist/test-template-content-extension-config/content/ContentApp.tsx +82 -0
- package/dist/test-template-content-extension-config/content/scripts.tsx +17 -0
- package/dist/test-template-content-extension-config/content/styles.css +10 -0
- package/dist/test-template-content-extension-config/extension.config.js +22 -0
- package/dist/test-template-content-extension-config/images/chromeWindow.png +0 -0
- package/dist/test-template-content-extension-config/images/extension_128.png +0 -0
- package/dist/test-template-content-extension-config/images/extension_16.png +0 -0
- package/dist/test-template-content-extension-config/images/extension_48.png +0 -0
- package/dist/test-template-content-extension-config/images/logo.svg +9 -0
- package/dist/test-template-content-extension-config/images/tailwind.png +0 -0
- package/dist/test-template-content-extension-config/images/tailwind_bg.png +0 -0
- package/dist/test-template-content-extension-config/images/typescript.png +0 -0
- package/dist/test-template-content-extension-config/manifest.json +28 -0
- package/dist/test-template-content-extension-config/package.json +44 -0
- package/dist/test-template-content-extension-config/postcss.config.js +6 -0
- package/dist/test-template-content-extension-config/tailwind.config.js +8 -0
- package/dist/test-template-content-extension-config/tsconfig.json +22 -0
- package/dist/test-template-content-less/README.md +35 -0
- package/dist/test-template-content-less/background.js +21 -0
- package/dist/test-template-content-less/content/scripts.js +32 -0
- package/dist/test-template-content-less/content/styles.less +51 -0
- package/dist/test-template-content-less/images/extension_128.png +0 -0
- package/dist/test-template-content-less/images/extension_16.png +0 -0
- package/dist/test-template-content-less/images/extension_48.png +0 -0
- package/dist/test-template-content-less/manifest.json +35 -0
- package/dist/test-template-content-less/package.json +21 -0
- package/dist/test-template-content-main-world/README.md +35 -0
- package/dist/test-template-content-main-world/background.js +1 -0
- package/dist/test-template-content-main-world/content/scripts.js +20 -0
- package/dist/test-template-content-main-world/content/styles.css +46 -0
- package/dist/test-template-content-main-world/extension.config.js +8 -0
- package/dist/test-template-content-main-world/images/extension_128.png +0 -0
- package/dist/test-template-content-main-world/images/extension_16.png +0 -0
- package/dist/test-template-content-main-world/images/extension_48.png +0 -0
- package/dist/test-template-content-main-world/manifest.json +37 -0
- package/dist/test-template-content-main-world/package.json +20 -0
- package/dist/test-template-content-preact/README.md +35 -0
- package/dist/test-template-content-preact/background.ts +1 -0
- package/dist/test-template-content-preact/content/ContentApp.tsx +92 -0
- package/dist/test-template-content-preact/content/scripts.tsx +14 -0
- package/dist/test-template-content-preact/content/styles.css +10 -0
- package/dist/test-template-content-preact/images/chromeWindow.png +0 -0
- package/dist/test-template-content-preact/images/extension_128.png +0 -0
- package/dist/test-template-content-preact/images/extension_16.png +0 -0
- package/dist/test-template-content-preact/images/extension_48.png +0 -0
- package/dist/test-template-content-preact/images/preact.png +0 -0
- package/dist/test-template-content-preact/images/tailwind.png +0 -0
- package/dist/test-template-content-preact/images/tailwind_bg.png +0 -0
- package/dist/test-template-content-preact/images/typescript.png +0 -0
- package/dist/test-template-content-preact/manifest.json +31 -0
- package/dist/test-template-content-preact/package.json +29 -0
- package/dist/test-template-content-preact/postcss.config.js +6 -0
- package/dist/test-template-content-preact/tailwind.config.js +8 -0
- package/dist/test-template-content-preact/tsconfig.json +27 -0
- package/dist/test-template-content-react/README.md +35 -0
- package/dist/test-template-content-react/background.ts +1 -0
- package/dist/test-template-content-react/content/ContentApp.tsx +86 -0
- package/dist/test-template-content-react/content/scripts.tsx +17 -0
- package/dist/test-template-content-react/content/styles.css +10 -0
- package/dist/test-template-content-react/images/chromeWindow.png +0 -0
- package/dist/test-template-content-react/images/extension_128.png +0 -0
- package/dist/test-template-content-react/images/extension_16.png +0 -0
- package/dist/test-template-content-react/images/extension_48.png +0 -0
- package/dist/test-template-content-react/images/react.png +0 -0
- package/dist/test-template-content-react/images/tailwind.png +0 -0
- package/dist/test-template-content-react/images/tailwind_bg.png +0 -0
- package/dist/test-template-content-react/images/typescript.png +0 -0
- package/dist/test-template-content-react/manifest.json +28 -0
- package/dist/test-template-content-react/package.json +28 -0
- package/dist/test-template-content-react/postcss.config.js +6 -0
- package/dist/test-template-content-react/tailwind.config.js +8 -0
- package/dist/test-template-content-react/tsconfig.json +22 -0
- package/dist/test-template-content-sass/README.md +35 -0
- package/dist/test-template-content-sass/background.js +21 -0
- package/dist/test-template-content-sass/content/scripts.js +32 -0
- package/dist/test-template-content-sass/content/styles.scss +51 -0
- package/dist/test-template-content-sass/images/extension_128.png +0 -0
- package/dist/test-template-content-sass/images/extension_16.png +0 -0
- package/dist/test-template-content-sass/images/extension_48.png +0 -0
- package/dist/test-template-content-sass/manifest.json +35 -0
- package/dist/test-template-content-sass/package.json +21 -0
- package/dist/test-template-content-sass-module/README.md +35 -0
- package/dist/test-template-content-sass-module/background.js +21 -0
- package/dist/test-template-content-sass-module/content/Logo.module.scss +18 -0
- package/dist/test-template-content-sass-module/content/scripts.js +33 -0
- package/dist/test-template-content-sass-module/content/styles.scss +40 -0
- package/dist/test-template-content-sass-module/images/extension_128.png +0 -0
- package/dist/test-template-content-sass-module/images/extension_16.png +0 -0
- package/dist/test-template-content-sass-module/images/extension_48.png +0 -0
- package/dist/test-template-content-sass-module/manifest.json +35 -0
- package/dist/test-template-content-sass-module/package.json +21 -0
- package/dist/test-template-content-tailwind/README.md +35 -0
- package/dist/test-template-content-tailwind/background.js +21 -0
- package/dist/test-template-content-tailwind/content/content.js +45 -0
- package/dist/test-template-content-tailwind/content/scripts.js +6 -0
- package/dist/test-template-content-tailwind/content/styles.css +10 -0
- package/dist/test-template-content-tailwind/images/chromeWindow.png +0 -0
- package/dist/test-template-content-tailwind/images/extension_128.png +0 -0
- package/dist/test-template-content-tailwind/images/extension_16.png +0 -0
- package/dist/test-template-content-tailwind/images/extension_48.png +0 -0
- package/dist/test-template-content-tailwind/images/react.png +0 -0
- package/dist/test-template-content-tailwind/images/tailwind.png +0 -0
- package/dist/test-template-content-tailwind/images/tailwind_bg.png +0 -0
- package/dist/test-template-content-tailwind/manifest.json +35 -0
- package/dist/test-template-content-tailwind/package.json +23 -0
- package/dist/test-template-content-tailwind/postcss.config.js +6 -0
- package/dist/test-template-content-tailwind/tailwind.config.js +8 -0
- package/dist/test-template-content-typescript/README.md +35 -0
- package/dist/test-template-content-typescript/background.ts +26 -0
- package/dist/test-template-content-typescript/content/scripts.ts +33 -0
- package/dist/test-template-content-typescript/content/styles.css +51 -0
- package/dist/test-template-content-typescript/images/extension_128.png +0 -0
- package/dist/test-template-content-typescript/images/extension_16.png +0 -0
- package/dist/test-template-content-typescript/images/extension_48.png +0 -0
- package/dist/test-template-content-typescript/images/typescript.png +0 -0
- package/dist/test-template-content-typescript/manifest.json +35 -0
- package/dist/test-template-content-typescript/package.json +21 -0
- package/dist/test-template-content-typescript/tsconfig.json +22 -0
- package/dist/test-template-content-vue/README.md +35 -0
- package/dist/test-template-content-vue/background.ts +1 -0
- package/dist/test-template-content-vue/content/ContentApp.vue +90 -0
- package/dist/test-template-content-vue/content/scripts.ts +13 -0
- package/dist/test-template-content-vue/content/shims-vue.d.ts +6 -0
- package/dist/test-template-content-vue/content/styles.css +10 -0
- package/dist/test-template-content-vue/images/chromeWindow.png +0 -0
- package/dist/test-template-content-vue/images/extension_128.png +0 -0
- package/dist/test-template-content-vue/images/extension_16.png +0 -0
- package/dist/test-template-content-vue/images/extension_48.png +0 -0
- package/dist/test-template-content-vue/images/tailwind.png +0 -0
- package/dist/test-template-content-vue/images/tailwind_bg.png +0 -0
- package/dist/test-template-content-vue/images/typescript.png +0 -0
- package/dist/test-template-content-vue/images/vue.svg +8 -0
- package/dist/test-template-content-vue/manifest.json +31 -0
- package/dist/test-template-content-vue/package.json +25 -0
- package/dist/test-template-content-vue/postcss.config.js +6 -0
- package/dist/test-template-content-vue/tailwind.config.js +8 -0
- package/dist/test-template-content-vue/tsconfig.json +22 -0
- package/dist/test-template-declarative_net_request/README.md +35 -0
- package/dist/test-template-declarative_net_request/images/extension_128.png +0 -0
- package/dist/test-template-declarative_net_request/images/extension_16.png +0 -0
- package/dist/test-template-declarative_net_request/images/extension_48.png +0 -0
- package/dist/test-template-declarative_net_request/manifest.json +34 -0
- package/dist/test-template-declarative_net_request/package.json +21 -0
- package/dist/test-template-declarative_net_request/public/public_ruleset.json +72 -0
- package/dist/test-template-declarative_net_request/rules_1.json +72 -0
- package/dist/test-template-init/README.md +35 -0
- package/dist/test-template-init/manifest.json +7 -0
- package/dist/test-template-init/package.json +32 -0
- package/dist/test-template-locales/README.md +35 -0
- package/dist/test-template-locales/_locales/en/messages.json +10 -0
- package/dist/test-template-locales/_locales/pt_BR/messages.json +10 -0
- package/dist/test-template-locales/action/index.html +40 -0
- package/dist/test-template-locales/action/scripts.js +3 -0
- package/dist/test-template-locales/action/styles.css +23 -0
- package/dist/test-template-locales/images/extension_128.png +0 -0
- package/dist/test-template-locales/images/extension_16.png +0 -0
- package/dist/test-template-locales/images/extension_48.png +0 -0
- package/dist/test-template-locales/manifest.json +19 -0
- package/dist/test-template-locales/package.json +21 -0
- package/dist/test-template-new-less/README.md +35 -0
- package/dist/test-template-new-less/images/extension_128.png +0 -0
- package/dist/test-template-new-less/images/extension_16.png +0 -0
- package/dist/test-template-new-less/images/extension_48.png +0 -0
- package/dist/test-template-new-less/manifest.json +15 -0
- package/dist/test-template-new-less/newtab/index.html +40 -0
- package/dist/test-template-new-less/newtab/scripts.js +11 -0
- package/dist/test-template-new-less/newtab/styles.less +19 -0
- package/dist/test-template-new-less/package.json +21 -0
- package/dist/test-template-new-preact/README.md +35 -0
- package/dist/test-template-new-preact/images/extension_128.png +0 -0
- package/dist/test-template-new-preact/images/extension_16.png +0 -0
- package/dist/test-template-new-preact/images/extension_48.png +0 -0
- package/dist/test-template-new-preact/images/preact.png +0 -0
- package/dist/test-template-new-preact/manifest.json +15 -0
- package/dist/test-template-new-preact/newtab/NewTabApp.tsx +27 -0
- package/dist/test-template-new-preact/newtab/index.html +13 -0
- package/dist/test-template-new-preact/newtab/scripts.tsx +5 -0
- package/dist/test-template-new-preact/newtab/styles.css +32 -0
- package/dist/test-template-new-preact/package.json +29 -0
- package/dist/test-template-new-preact/tsconfig.json +22 -0
- package/dist/test-template-new-react/README.md +35 -0
- package/dist/test-template-new-react/images/extension_128.png +0 -0
- package/dist/test-template-new-react/images/extension_16.png +0 -0
- package/dist/test-template-new-react/images/extension_48.png +0 -0
- package/dist/test-template-new-react/images/react.png +0 -0
- package/dist/test-template-new-react/manifest.json +15 -0
- package/dist/test-template-new-react/newtab/NewTabApp.tsx +27 -0
- package/dist/test-template-new-react/newtab/index.html +13 -0
- package/dist/test-template-new-react/newtab/scripts.tsx +12 -0
- package/dist/test-template-new-react/newtab/styles.css +23 -0
- package/dist/test-template-new-react/package.json +28 -0
- package/dist/test-template-new-react/tsconfig.json +22 -0
- package/dist/test-template-new-sass/README.md +35 -0
- package/dist/test-template-new-sass/images/extension_128.png +0 -0
- package/dist/test-template-new-sass/images/extension_16.png +0 -0
- package/dist/test-template-new-sass/images/extension_48.png +0 -0
- package/dist/test-template-new-sass/manifest.json +15 -0
- package/dist/test-template-new-sass/newtab/index.html +40 -0
- package/dist/test-template-new-sass/newtab/scripts.js +11 -0
- package/dist/test-template-new-sass/newtab/styles.scss +19 -0
- package/dist/test-template-new-sass/package.json +22 -0
- package/dist/test-template-new-tailwind/README.md +35 -0
- package/dist/test-template-new-tailwind/images/chromeWindow.png +0 -0
- package/dist/test-template-new-tailwind/images/extension_128.png +0 -0
- package/dist/test-template-new-tailwind/images/extension_16.png +0 -0
- package/dist/test-template-new-tailwind/images/extension_48.png +0 -0
- package/dist/test-template-new-tailwind/images/react.png +0 -0
- package/dist/test-template-new-tailwind/images/tailwind.png +0 -0
- package/dist/test-template-new-tailwind/images/tailwind_bg.png +0 -0
- package/dist/test-template-new-tailwind/manifest.json +15 -0
- package/dist/test-template-new-tailwind/newtab/NewTabApp.tsx +67 -0
- package/dist/test-template-new-tailwind/newtab/index.html +13 -0
- package/dist/test-template-new-tailwind/newtab/scripts.tsx +12 -0
- package/dist/test-template-new-tailwind/newtab/styles.css +3 -0
- package/dist/test-template-new-tailwind/package.json +28 -0
- package/dist/test-template-new-tailwind/postcss.config.js +6 -0
- package/dist/test-template-new-tailwind/tailwind.config.js +8 -0
- package/dist/test-template-new-tailwind/tsconfig.json +22 -0
- package/dist/test-template-new-typescript/README.md +35 -0
- package/dist/test-template-new-typescript/images/extension_128.png +0 -0
- package/dist/test-template-new-typescript/images/extension_16.png +0 -0
- package/dist/test-template-new-typescript/images/extension_48.png +0 -0
- package/dist/test-template-new-typescript/images/typescript.png +0 -0
- package/dist/test-template-new-typescript/manifest.json +15 -0
- package/dist/test-template-new-typescript/newtab/index.html +25 -0
- package/dist/test-template-new-typescript/newtab/scripts.ts +10 -0
- package/dist/test-template-new-typescript/newtab/styles.css +18 -0
- package/dist/test-template-new-typescript/package.json +22 -0
- package/dist/test-template-new-typescript/tsconfig.json +22 -0
- package/dist/test-template-new-vue/README.md +35 -0
- package/dist/test-template-new-vue/images/extension_128.png +0 -0
- package/dist/test-template-new-vue/images/extension_16.png +0 -0
- package/dist/test-template-new-vue/images/extension_48.png +0 -0
- package/dist/test-template-new-vue/images/vue.svg +8 -0
- package/dist/test-template-new-vue/manifest.json +15 -0
- package/dist/test-template-new-vue/newtab/NewTabApp.vue +30 -0
- package/dist/test-template-new-vue/newtab/index.html +13 -0
- package/dist/test-template-new-vue/newtab/scripts.ts +7 -0
- package/dist/test-template-new-vue/newtab/styles.css +36 -0
- package/dist/test-template-new-vue/package.json +25 -0
- package/dist/test-template-new-vue/tsconfig.json +22 -0
- package/dist/test-template-sidebar/README.md +35 -0
- package/dist/test-template-sidebar/images/extension_128.png +0 -0
- package/dist/test-template-sidebar/images/extension_16.png +0 -0
- package/dist/test-template-sidebar/images/extension_48.png +0 -0
- package/dist/test-template-sidebar/manifest.json +37 -0
- package/dist/test-template-sidebar/package.json +21 -0
- package/dist/test-template-sidebar/puzzle.png +0 -0
- package/dist/test-template-sidebar/sidebar/index.html +39 -0
- package/dist/test-template-sidebar/sidebar/scripts.js +11 -0
- package/dist/test-template-sidebar/sidebar/styles.css +27 -0
- package/dist/test-template-sidebar/test_16.png +0 -0
- package/dist/test-template-sidebar/test_32.png +0 -0
- package/dist/test-template-sidebar/test_48.png +0 -0
- package/dist/test-template-sidebar/test_64.png +0 -0
- package/dist/test-template-special-folders-pages/README.md +35 -0
- package/dist/test-template-special-folders-pages/background.js +5 -0
- package/dist/test-template-special-folders-pages/images/extension_128.png +0 -0
- package/dist/test-template-special-folders-pages/images/extension_16.png +0 -0
- package/dist/test-template-special-folders-pages/images/extension_48.png +0 -0
- package/dist/test-template-special-folders-pages/images/notpublic-file.png +0 -0
- package/dist/test-template-special-folders-pages/manifest.json +26 -0
- package/dist/test-template-special-folders-pages/package.json +21 -0
- package/dist/test-template-special-folders-pages/pages/custom.html +8 -0
- package/dist/test-template-special-folders-pages/pages/main.css +18 -0
- package/dist/test-template-special-folders-pages/pages/main.html +16 -0
- package/dist/test-template-special-folders-pages/pages/main.js +1 -0
- package/dist/test-template-special-folders-pages/public/css/file.css +3 -0
- package/dist/test-template-special-folders-pages/public/html/file.html +8 -0
- package/dist/test-template-special-folders-pages/public/img/icon.png +0 -0
- package/dist/test-template-special-folders-pages/public/js/file.js +0 -0
- package/dist/test-template-special-folders-pages/sandbox/index.html +24 -0
- package/dist/test-template-special-folders-pages/sandbox/scripts.js +0 -0
- package/dist/test-template-special-folders-pages/sandbox/styles.css +1 -0
- package/dist/test-template-special-folders-scripts/README.md +35 -0
- package/dist/test-template-special-folders-scripts/background.js +24 -0
- package/dist/test-template-special-folders-scripts/images/extension_128.png +0 -0
- package/dist/test-template-special-folders-scripts/images/extension_16.png +0 -0
- package/dist/test-template-special-folders-scripts/images/extension_48.png +0 -0
- package/dist/test-template-special-folders-scripts/manifest.json +27 -0
- package/dist/test-template-special-folders-scripts/package.json +21 -0
- package/dist/test-template-special-folders-scripts/pages/index.css +5 -0
- package/dist/test-template-special-folders-scripts/pages/index.html +3 -0
- package/dist/test-template-special-folders-scripts/pages/index.js +1 -0
- package/dist/test-template-special-folders-scripts/public/extension.png +0 -0
- package/dist/test-template-special-folders-scripts/scripts/content-script.js +3 -0
- package/dist/test-template-storage/README.md +35 -0
- package/dist/test-template-storage/images/extension_128.png +0 -0
- package/dist/test-template-storage/images/extension_16.png +0 -0
- package/dist/test-template-storage/images/extension_48.png +0 -0
- package/dist/test-template-storage/manifest.json +15 -0
- package/dist/test-template-storage/package.json +21 -0
- package/dist/test-template-storage/schema.json +44 -0
- package/package.json +3 -3
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>Babel Extension</title>
|
|
7
|
+
<link
|
|
8
|
+
rel="stylesheet"
|
|
9
|
+
href="https://unpkg.com/sakura.css/css/sakura.css"
|
|
10
|
+
media="screen"
|
|
11
|
+
/>
|
|
12
|
+
<link
|
|
13
|
+
rel="stylesheet"
|
|
14
|
+
href="https://unpkg.com/sakura.css/css/sakura-dark.css"
|
|
15
|
+
media="screen and (prefers-color-scheme: dark)"
|
|
16
|
+
/>
|
|
17
|
+
<link rel="stylesheet" href="./styles.css" media="screen" />
|
|
18
|
+
</head>
|
|
19
|
+
<body>
|
|
20
|
+
<header>
|
|
21
|
+
<h1>
|
|
22
|
+
<img
|
|
23
|
+
class="babel"
|
|
24
|
+
src="../images/babel.png"
|
|
25
|
+
alt="The Babel logo"
|
|
26
|
+
width="120px"
|
|
27
|
+
/>
|
|
28
|
+
<br />
|
|
29
|
+
Welcome to your Babel Extension
|
|
30
|
+
</h1>
|
|
31
|
+
<p>
|
|
32
|
+
Learn more about creating cross-browser extensions at
|
|
33
|
+
<a href="https://extension.js.org" target="_blank"
|
|
34
|
+
>https://extension.js.org</a
|
|
35
|
+
>.
|
|
36
|
+
</p>
|
|
37
|
+
</header>
|
|
38
|
+
</body>
|
|
39
|
+
<script src="./scripts.js"></script>
|
|
40
|
+
</html>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
body {
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: center;
|
|
4
|
+
align-items: center;
|
|
5
|
+
height: calc(100vh - 26px);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
h1 {
|
|
9
|
+
font-size: 4.7em;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.babel:hover {
|
|
13
|
+
filter: grayscale(1);
|
|
14
|
+
transition:
|
|
15
|
+
filter 2s,
|
|
16
|
+
border-color 2s;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.new:hover {
|
|
20
|
+
filter: grayscale(0);
|
|
21
|
+
border-color: aquamarine;
|
|
22
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"private": true,
|
|
3
|
+
"name": "test-template-config-babel",
|
|
4
|
+
"description": "An Extension.js example.",
|
|
5
|
+
"version": "0.0.1",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Your Name",
|
|
8
|
+
"email": "your@email.com",
|
|
9
|
+
"url": "https://yourwebsite.com"
|
|
10
|
+
},
|
|
11
|
+
"devDependencies": {
|
|
12
|
+
"@babel/core": "^7.24.9",
|
|
13
|
+
"babel-loader": "^9.1.3",
|
|
14
|
+
"babel-preset-modern-browser-extension": "^0.7.0",
|
|
15
|
+
"stylelint": "^16.7.0",
|
|
16
|
+
"extension": "latest"
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"dev": "extension dev",
|
|
20
|
+
"start": "extension start",
|
|
21
|
+
"build": "extension build"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {}
|
|
24
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# test-template-config-stylelint
|
|
2
|
+
|
|
3
|
+
> An Extension.js example.
|
|
4
|
+
|
|
5
|
+
## Available Scripts
|
|
6
|
+
|
|
7
|
+
In the project directory, you can run the following scripts:
|
|
8
|
+
|
|
9
|
+
### pnpm dev
|
|
10
|
+
|
|
11
|
+
**Development Mode**: This command runs your extension in development mode. It will launch a new browser instance with your extension loaded. The page will automatically reload whenever you make changes to your code, allowing for a smooth development experience.
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pnpm dev
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### pnpm start
|
|
18
|
+
|
|
19
|
+
**Production Preview**: This command runs your extension in production mode. It will launch a new browser instance with your extension loaded, simulating the environment and behavior of your extension as it will appear once published.
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pnpm start
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### pnpm build
|
|
26
|
+
|
|
27
|
+
**Build for Production**: This command builds your extension for production. It optimizes and bundles your extension, preparing it for deployment to the target browser's store.
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pnpm build
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Learn More
|
|
34
|
+
|
|
35
|
+
To learn more about creating cross-browser extensions with Extension.js, visit the [official documentation](https://extension.js.org).
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="2500" height="2393" viewBox="0 0 256 245" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><path d="M129.74 243.648c28-100.109 27.188-100.563 47.425-171.942l4.864 2.816c2.65 1.516 4.813.268 4.813-2.778V37.696C192.218 18.893 196.416 4.352 197.658 0h21.92L256 33.728 232.077 54.4l18.093 19.565-119.226 169.683c-.576.96-1.389.742-1.203 0zm13.025-215.782c1.088 0 1.958.595 1.958 1.344v17.44c0 .73-.877 1.324-1.958 1.324h-29.44c-1.088 0-1.965-.595-1.965-1.33V29.196c0-.736.877-1.344 1.958-1.344h29.44l.007.013zM179.117 8.55L146.72 27.251c.371.576.602 1.235.602 1.952v17.453c0 .896-.359 1.715-.935 2.368l32.723 18.893c2.228 1.293 4.058.237 4.058-2.336V10.893c0-2.58-1.818-3.629-4.051-2.343zm-70.362 38.106v-17.46c0-.716.23-1.375.602-1.945L76.96 8.538c-2.227-1.28-4.058-.23-4.058 2.342v54.688c0 2.573 1.83 3.629 4.064 2.336l32.717-18.893c-.576-.659-.921-1.472-.921-2.368l-.007.013zm16.301 196.992h1.203C98.266 143.539 99.072 143.085 78.835 71.706l-4.864 2.816c-2.643 1.516-4.813.268-4.813-2.778V37.696C63.782 18.899 59.584 4.352 58.342 0H36.43L0 33.728 23.917 54.4 5.824 73.971l119.232 169.677zM127.11 84.41a8.845 8.845 0 1 0 0-17.69 8.845 8.845 0 0 0 0 17.69zm0 52.576a8.845 8.845 0 1 0 0-17.69 8.845 8.845 0 0 0 0 17.69zm0 52.588a8.845 8.845 0 1 0 0-17.69 8.845 8.845 0 0 0 0 17.69z"/></svg>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest_version": 3,
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"name": "test-template-config-stylelint",
|
|
5
|
+
"description": "An Extension.js example.",
|
|
6
|
+
"icons": {
|
|
7
|
+
"16": "images/extension_16.png",
|
|
8
|
+
"48": "images/extension_48.png",
|
|
9
|
+
"128": "images/extension_128.png"
|
|
10
|
+
},
|
|
11
|
+
"chrome_url_overrides": {
|
|
12
|
+
"newtab": "newtab/index.html"
|
|
13
|
+
},
|
|
14
|
+
"author": "Your Name"
|
|
15
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>Stylelint Extension</title>
|
|
7
|
+
<link
|
|
8
|
+
rel="stylesheet"
|
|
9
|
+
href="https://unpkg.com/sakura.css/css/sakura.css"
|
|
10
|
+
media="screen"
|
|
11
|
+
/>
|
|
12
|
+
<link
|
|
13
|
+
rel="stylesheet"
|
|
14
|
+
href="https://unpkg.com/sakura.css/css/sakura-dark.css"
|
|
15
|
+
media="screen and (prefers-color-scheme: dark)"
|
|
16
|
+
/>
|
|
17
|
+
<link rel="stylesheet" href="./styles.scss" media="screen" />
|
|
18
|
+
</head>
|
|
19
|
+
<body>
|
|
20
|
+
<header>
|
|
21
|
+
<h1>
|
|
22
|
+
<img
|
|
23
|
+
class="stylelint"
|
|
24
|
+
src="../images/stylelint.svg"
|
|
25
|
+
alt="The Stylelint logo"
|
|
26
|
+
width="120px"
|
|
27
|
+
/>
|
|
28
|
+
<br />
|
|
29
|
+
Welcome to your Stylelint Extension
|
|
30
|
+
</h1>
|
|
31
|
+
<p>
|
|
32
|
+
Learn more about creating cross-browser extensions at
|
|
33
|
+
<a href="https://extension.js.org" target="_blank"
|
|
34
|
+
>https://extension.js.org</a
|
|
35
|
+
>.
|
|
36
|
+
</p>
|
|
37
|
+
</header>
|
|
38
|
+
</body>
|
|
39
|
+
<script src="./scripts.js"></script>
|
|
40
|
+
</html>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
body {
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: center;
|
|
4
|
+
align-items: center;
|
|
5
|
+
height: calc(100vh - 26px);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
h1 {
|
|
9
|
+
font-size: 4.7em;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.stylelint:hover {
|
|
13
|
+
filter: grayscale(1);
|
|
14
|
+
transition: filter 2s,
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.new:hover {
|
|
18
|
+
filter: grayscale(0);
|
|
19
|
+
border-color: aquamarine;
|
|
20
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"private": true,
|
|
3
|
+
"name": "test-template-config-stylelint",
|
|
4
|
+
"description": "An Extension.js example.",
|
|
5
|
+
"version": "0.0.1",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Your Name",
|
|
8
|
+
"email": "your@email.com",
|
|
9
|
+
"url": "https://yourwebsite.com"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"lint:css": "npx stylelint '**/*.scss'",
|
|
13
|
+
"dev": "extension dev",
|
|
14
|
+
"start": "extension start",
|
|
15
|
+
"build": "extension build"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"sass": "^1.77.8",
|
|
19
|
+
"stylelint": "^16.7.0",
|
|
20
|
+
"stylelint-config-standard-scss": "^13.1.0",
|
|
21
|
+
"extension": "latest"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {}
|
|
24
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# test-template-content
|
|
2
|
+
|
|
3
|
+
> An Extension.js example.
|
|
4
|
+
|
|
5
|
+
## Available Scripts
|
|
6
|
+
|
|
7
|
+
In the project directory, you can run the following scripts:
|
|
8
|
+
|
|
9
|
+
### pnpm dev
|
|
10
|
+
|
|
11
|
+
**Development Mode**: This command runs your extension in development mode. It will launch a new browser instance with your extension loaded. The page will automatically reload whenever you make changes to your code, allowing for a smooth development experience.
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pnpm dev
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### pnpm start
|
|
18
|
+
|
|
19
|
+
**Production Preview**: This command runs your extension in production mode. It will launch a new browser instance with your extension loaded, simulating the environment and behavior of your extension as it will appear once published.
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pnpm start
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### pnpm build
|
|
26
|
+
|
|
27
|
+
**Build for Production**: This command builds your extension for production. It optimizes and bundles your extension, preparing it for deployment to the target browser's store.
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pnpm build
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Learn More
|
|
34
|
+
|
|
35
|
+
To learn more about creating cross-browser extensions with Extension.js, visit the [official documentation](https://extension.js.org).
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
console.log('hello from background script')
|
|
2
|
+
|
|
3
|
+
chrome.runtime.onMessage.addListener((request, sender) => {
|
|
4
|
+
if (request.action === 'changeBackgroundColor') {
|
|
5
|
+
changeBackgroundColor(request.color, sender.tab.id)
|
|
6
|
+
}
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
function changeBackgroundColor(color, tabId) {
|
|
10
|
+
chrome.scripting
|
|
11
|
+
.executeScript({
|
|
12
|
+
target: {tabId},
|
|
13
|
+
function: setPageBackgroundColor,
|
|
14
|
+
args: [color]
|
|
15
|
+
})
|
|
16
|
+
.catch(console.error)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function setPageBackgroundColor(color) {
|
|
20
|
+
document.body.style.backgroundColor = color
|
|
21
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import extensionJsLogo from '../images/extension_128.png'
|
|
2
|
+
import './styles.css'
|
|
3
|
+
|
|
4
|
+
console.log('hello from content_scripts')
|
|
5
|
+
|
|
6
|
+
document.body.innerHTML += `
|
|
7
|
+
<div class="content_script-box">
|
|
8
|
+
<img class="content_script-logo" src=${extensionJsLogo} />
|
|
9
|
+
<h1 class="content_script-title">
|
|
10
|
+
Change the background-color ⬇
|
|
11
|
+
</h1>
|
|
12
|
+
<input type="color" class="content_script-colorPicker" id="colorPicker">
|
|
13
|
+
<p class="content_script-description">
|
|
14
|
+
Learn more about creating browser extensions at <a
|
|
15
|
+
className="underline hover:no-underline"
|
|
16
|
+
href="https://extension.js.org"
|
|
17
|
+
target="_blank"
|
|
18
|
+
>
|
|
19
|
+
https://extension.js.org
|
|
20
|
+
</a>
|
|
21
|
+
</p>
|
|
22
|
+
</div>
|
|
23
|
+
`
|
|
24
|
+
|
|
25
|
+
document.getElementById('colorPicker').addEventListener('input', (event) => {
|
|
26
|
+
chrome.runtime
|
|
27
|
+
.sendMessage({
|
|
28
|
+
action: 'changeBackgroundColor',
|
|
29
|
+
color: event.target.value
|
|
30
|
+
})
|
|
31
|
+
.catch(console.error)
|
|
32
|
+
})
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
.content_script-box {
|
|
2
|
+
background: white;
|
|
3
|
+
position: fixed;
|
|
4
|
+
right: 0;
|
|
5
|
+
bottom: 0;
|
|
6
|
+
z-index: 9;
|
|
7
|
+
width: 315px;
|
|
8
|
+
height: 345px;
|
|
9
|
+
margin: 1em;
|
|
10
|
+
padding: 1em;
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
gap: 1em;
|
|
16
|
+
box-shadow: 0px 0px 4px 1px #ccc;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.content_script-logo {
|
|
20
|
+
width: 90px;
|
|
21
|
+
align-self: flex-start;
|
|
22
|
+
filter: grayscale(1);
|
|
23
|
+
transition:
|
|
24
|
+
filter 2s,
|
|
25
|
+
border-color 2s;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.content_script-logo:hover {
|
|
29
|
+
filter: grayscale(0);
|
|
30
|
+
border-color: aquamarine;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.content_script-title {
|
|
34
|
+
font-size: 1.85em;
|
|
35
|
+
color: #333;
|
|
36
|
+
line-height: 1.1;
|
|
37
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
|
38
|
+
'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
|
|
39
|
+
font-weight: 700;
|
|
40
|
+
overflow-wrap: break-word;
|
|
41
|
+
word-wrap: break-word;
|
|
42
|
+
-ms-word-break: break-all;
|
|
43
|
+
word-break: break-word;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.content_script-description {
|
|
47
|
+
color: #999;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.content_script-colorPicker {
|
|
51
|
+
display: block;
|
|
52
|
+
width: 100%;
|
|
53
|
+
height: 50px;
|
|
54
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest_version": 3,
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"name": "test-template-content",
|
|
5
|
+
"description": "An Extension.js example.",
|
|
6
|
+
"icons": {
|
|
7
|
+
"16": "images/extension_16.png",
|
|
8
|
+
"48": "images/extension_48.png",
|
|
9
|
+
"128": "images/extension_128.png"
|
|
10
|
+
},
|
|
11
|
+
"permissions": [
|
|
12
|
+
"activeTab",
|
|
13
|
+
"scripting"
|
|
14
|
+
],
|
|
15
|
+
"host_permissions": [
|
|
16
|
+
"<all_urls>"
|
|
17
|
+
],
|
|
18
|
+
"background": {
|
|
19
|
+
"chromium:service_worker": "background.js",
|
|
20
|
+
"firefox:scripts": [
|
|
21
|
+
"background.js"
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"content_scripts": [
|
|
25
|
+
{
|
|
26
|
+
"matches": [
|
|
27
|
+
"<all_urls>"
|
|
28
|
+
],
|
|
29
|
+
"js": [
|
|
30
|
+
"content/scripts.js"
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"author": "Your Name"
|
|
35
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"private": true,
|
|
3
|
+
"name": "test-template-content",
|
|
4
|
+
"description": "An Extension.js example.",
|
|
5
|
+
"version": "0.0.1",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Your Name",
|
|
8
|
+
"email": "your@email.com",
|
|
9
|
+
"url": "https://yourwebsite.com"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"dev": "extension dev",
|
|
13
|
+
"start": "extension start",
|
|
14
|
+
"build": "extension build"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"extension": "latest"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# test-template-content-css-module
|
|
2
|
+
|
|
3
|
+
> An Extension.js example.
|
|
4
|
+
|
|
5
|
+
## Available Scripts
|
|
6
|
+
|
|
7
|
+
In the project directory, you can run the following scripts:
|
|
8
|
+
|
|
9
|
+
### pnpm dev
|
|
10
|
+
|
|
11
|
+
**Development Mode**: This command runs your extension in development mode. It will launch a new browser instance with your extension loaded. The page will automatically reload whenever you make changes to your code, allowing for a smooth development experience.
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pnpm dev
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### pnpm start
|
|
18
|
+
|
|
19
|
+
**Production Preview**: This command runs your extension in production mode. It will launch a new browser instance with your extension loaded, simulating the environment and behavior of your extension as it will appear once published.
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pnpm start
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### pnpm build
|
|
26
|
+
|
|
27
|
+
**Build for Production**: This command builds your extension for production. It optimizes and bundles your extension, preparing it for deployment to the target browser's store.
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pnpm build
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Learn More
|
|
34
|
+
|
|
35
|
+
To learn more about creating cross-browser extensions with Extension.js, visit the [official documentation](https://extension.js.org).
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
console.log('hello from background script')
|
|
2
|
+
|
|
3
|
+
chrome.runtime.onMessage.addListener((request, sender) => {
|
|
4
|
+
if (request.action === 'changeBackgroundColor') {
|
|
5
|
+
changeBackgroundColor(request.color, sender.tab.id)
|
|
6
|
+
}
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
function changeBackgroundColor(color, tabId) {
|
|
10
|
+
chrome.scripting
|
|
11
|
+
.executeScript({
|
|
12
|
+
target: {tabId},
|
|
13
|
+
function: setPageBackgroundColor,
|
|
14
|
+
args: [color]
|
|
15
|
+
})
|
|
16
|
+
.catch(console.error)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function setPageBackgroundColor(color) {
|
|
20
|
+
document.body.style.backgroundColor = color
|
|
21
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import extensionJsLogo from '../images/extension_128.png'
|
|
2
|
+
import './styles.css'
|
|
3
|
+
import styles from './Logo.module.css'
|
|
4
|
+
|
|
5
|
+
console.log('hello from content_scripts')
|
|
6
|
+
|
|
7
|
+
document.body.innerHTML += `
|
|
8
|
+
<div class="content_script-box">
|
|
9
|
+
<img class=${styles.logo} src=${extensionJsLogo} />
|
|
10
|
+
<h1 class="content_script-title">
|
|
11
|
+
Change the background-color ⬇
|
|
12
|
+
</h1>
|
|
13
|
+
<input type="color" class="content_script-colorPicker" id="colorPicker">
|
|
14
|
+
<p class="content_script-description">
|
|
15
|
+
Learn more about creating browser extensions at <a
|
|
16
|
+
className="underline hover:no-underline"
|
|
17
|
+
href="https://extension.js.org"
|
|
18
|
+
target="_blank"
|
|
19
|
+
>
|
|
20
|
+
https://extension.js.org
|
|
21
|
+
</a>
|
|
22
|
+
</p>
|
|
23
|
+
</div>
|
|
24
|
+
`
|
|
25
|
+
|
|
26
|
+
document.getElementById('colorPicker').addEventListener('input', (event) => {
|
|
27
|
+
chrome.runtime
|
|
28
|
+
.sendMessage({
|
|
29
|
+
action: 'changeBackgroundColor',
|
|
30
|
+
color: event.target.value
|
|
31
|
+
})
|
|
32
|
+
.catch(console.error)
|
|
33
|
+
})
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
.content_script-box {
|
|
2
|
+
background: white;
|
|
3
|
+
position: fixed;
|
|
4
|
+
right: 0;
|
|
5
|
+
bottom: 0;
|
|
6
|
+
z-index: 9;
|
|
7
|
+
width: 315px;
|
|
8
|
+
height: 345px;
|
|
9
|
+
margin: 1em;
|
|
10
|
+
padding: 1em;
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
gap: 1em;
|
|
16
|
+
box-shadow: 0px 0px 4px 1px #ccc;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.content_script-title {
|
|
20
|
+
font-size: 1.85em;
|
|
21
|
+
color: #333;
|
|
22
|
+
line-height: 1.1;
|
|
23
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
|
24
|
+
'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
|
|
25
|
+
font-weight: 700;
|
|
26
|
+
overflow-wrap: break-word;
|
|
27
|
+
word-wrap: break-word;
|
|
28
|
+
-ms-word-break: break-all;
|
|
29
|
+
word-break: break-word;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.content_script-description {
|
|
33
|
+
color: #999;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.content_script-colorPicker {
|
|
37
|
+
display: block;
|
|
38
|
+
width: 100%;
|
|
39
|
+
height: 50px;
|
|
40
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest_version": 3,
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"name": "test-template-content-css-module",
|
|
5
|
+
"description": "An Extension.js example.",
|
|
6
|
+
"icons": {
|
|
7
|
+
"16": "images/extension_16.png",
|
|
8
|
+
"48": "images/extension_48.png",
|
|
9
|
+
"128": "images/extension_128.png"
|
|
10
|
+
},
|
|
11
|
+
"permissions": [
|
|
12
|
+
"activeTab",
|
|
13
|
+
"scripting"
|
|
14
|
+
],
|
|
15
|
+
"host_permissions": [
|
|
16
|
+
"<all_urls>"
|
|
17
|
+
],
|
|
18
|
+
"background": {
|
|
19
|
+
"chromium:service_worker": "background.js",
|
|
20
|
+
"firefox:scripts": [
|
|
21
|
+
"background.js"
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"content_scripts": [
|
|
25
|
+
{
|
|
26
|
+
"matches": [
|
|
27
|
+
"<all_urls>"
|
|
28
|
+
],
|
|
29
|
+
"js": [
|
|
30
|
+
"content/scripts.js"
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"author": "Your Name"
|
|
35
|
+
}
|