From 8d86ea0e9c9502fa6092f49e9fb976668f897829 Mon Sep 17 00:00:00 2001 From: Romstar Date: Sun, 29 Oct 2023 22:25:41 -0400 Subject: [PATCH] removed unused permissions in the manifest. Removed unused html pages --- src/manifest.json | 10 ++++------ src/pages/Devtools/index.html | 9 --------- src/pages/Devtools/index.ts | 5 ----- src/pages/Options/Options.css | 8 -------- src/pages/Options/Options.tsx | 12 ------------ src/pages/Options/index.css | 0 src/pages/Options/index.html | 14 -------------- src/pages/Options/index.tsx | 9 --------- webpack.config.js | 16 +--------------- 9 files changed, 5 insertions(+), 78 deletions(-) delete mode 100644 src/pages/Devtools/index.html delete mode 100644 src/pages/Devtools/index.ts delete mode 100644 src/pages/Options/Options.css delete mode 100644 src/pages/Options/Options.tsx delete mode 100644 src/pages/Options/index.css delete mode 100644 src/pages/Options/index.html delete mode 100644 src/pages/Options/index.tsx diff --git a/src/manifest.json b/src/manifest.json index f702447..556378d 100755 --- a/src/manifest.json +++ b/src/manifest.json @@ -2,13 +2,11 @@ "manifest_version": 3, "name": "Launching Buddy", "description": "A chrome extension that automatically messages all of your ProductHunt followers on Twitter", - "options_page": "options.html", "background": { "service_worker": "background.bundle.js" }, "permissions": [ "tabs", - "activeTab", "storage" ], "action": { @@ -21,9 +19,10 @@ "content_scripts": [ { "matches": [ - "http://*/*", - "https://*/*", - "" + "https://producthunt.com/*", + "https://www.producthunt.com/*", + "https://twitter.com/*", + "https://www.twitter.com/*" ], "js": [ "contentScript.bundle.js" @@ -33,7 +32,6 @@ ] } ], - "devtools_page": "devtools.html", "web_accessible_resources": [ { "resources": [ diff --git a/src/pages/Devtools/index.html b/src/pages/Devtools/index.html deleted file mode 100644 index a47b2fe..0000000 --- a/src/pages/Devtools/index.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/src/pages/Devtools/index.ts b/src/pages/Devtools/index.ts deleted file mode 100644 index 647319a..0000000 --- a/src/pages/Devtools/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -chrome.devtools.panels.create( - 'Dev Tools from chrome-extension-boilerplate-react', - 'icon-34.png', - 'panel.html' -); diff --git a/src/pages/Options/Options.css b/src/pages/Options/Options.css deleted file mode 100644 index 08a2ee4..0000000 --- a/src/pages/Options/Options.css +++ /dev/null @@ -1,8 +0,0 @@ -.OptionsContainer { - width: 100%; - height: 50vh; - font-size: 2rem; - display: flex; - align-items: center; - justify-content: center; -} diff --git a/src/pages/Options/Options.tsx b/src/pages/Options/Options.tsx deleted file mode 100644 index f42e02d..0000000 --- a/src/pages/Options/Options.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import React from 'react'; -import './Options.css'; - -interface Props { - title: string; -} - -const Options: React.FC = ({ title }: Props) => { - return
{title} Page
; -}; - -export default Options; diff --git a/src/pages/Options/index.css b/src/pages/Options/index.css deleted file mode 100644 index e69de29..0000000 diff --git a/src/pages/Options/index.html b/src/pages/Options/index.html deleted file mode 100644 index f4abefd..0000000 --- a/src/pages/Options/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - Settings - - - -
- - - \ No newline at end of file diff --git a/src/pages/Options/index.tsx b/src/pages/Options/index.tsx deleted file mode 100644 index 0e641be..0000000 --- a/src/pages/Options/index.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import { createRoot } from 'react-dom/client'; - -import Options from './Options'; -import './index.css'; - -const container = document.getElementById('launch-buddy-app-container'); -const root = createRoot(container!); // createRoot(container!) if you use TypeScript -root.render(); diff --git a/webpack.config.js b/webpack.config.js index cd63577..1cdaf54 100755 --- a/webpack.config.js +++ b/webpack.config.js @@ -38,15 +38,13 @@ const isDevelopment = process.env.NODE_ENV !== 'production'; const options = { mode: process.env.NODE_ENV || 'development', entry: { - options: path.join(__dirname, 'src', 'pages', 'Options', 'index.tsx'), popup: path.join(__dirname, 'src', 'pages', 'Popup', 'index.tsx'), background: path.join(__dirname, 'src', 'pages', 'Background', 'index.ts'), contentScript: path.join(__dirname, 'src', 'pages', 'Content', 'index.ts'), - devtools: path.join(__dirname, 'src', 'pages', 'Devtools', 'index.ts'), panel: path.join(__dirname, 'src', 'pages', 'Panel', 'index.tsx'), }, chromeExtensionBoilerplate: { - notHotReload: ['background', 'contentScript', 'devtools'], + notHotReload: ['background', 'contentScript'], }, output: { filename: '[name].bundle.js', @@ -183,24 +181,12 @@ const options = { }, ], }), - new HtmlWebpackPlugin({ - template: path.join(__dirname, 'src', 'pages', 'Options', 'index.html'), - filename: 'options.html', - chunks: ['options'], - cache: false, - }), new HtmlWebpackPlugin({ template: path.join(__dirname, 'src', 'pages', 'Popup', 'index.html'), filename: 'popup.html', chunks: ['popup'], cache: false, }), - new HtmlWebpackPlugin({ - template: path.join(__dirname, 'src', 'pages', 'Devtools', 'index.html'), - filename: 'devtools.html', - chunks: ['devtools'], - cache: false, - }), new HtmlWebpackPlugin({ template: path.join(__dirname, 'src', 'pages', 'Panel', 'index.html'), filename: 'panel.html',