diff --git a/.gitignore b/.gitignore index c4c4ffc..6dd55d4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ *.zip +node_modules diff --git a/Makefile b/Makefile deleted file mode 100644 index abd5342..0000000 --- a/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -package-chrome: - cd ./extensions/chrome && zip -r -FS ../../rfd-redirect-chrome-extension.zip * --exclude '*.git*' - -package-firefox: - cd ./extensions/firefox && zip -r -FS ../../rfd-redirect-firefox-extension.zip * --exclude '*.git*' - diff --git a/README.md b/README.md index c009e02..12c71ac 100644 --- a/README.md +++ b/README.md @@ -14,21 +14,26 @@ Copy [script.js](./script.js) into Tampermonkey. ## Browser Extensions -The browser extensions are currently not packaged or published anywhere. - -### Chrome - -To load the chrome extension, clone this repo and load [extensions/chrome](./extensions/chrome/). +The browser extensions is currently not packaged or published anywhere. ### Firefox -To load the firefox extension, clone this repo and load [extensions/firefox](./extensions/firefox/). +To load the firefox extension, clone this repo and load the root dir. Go to `about:addons`, and ensure that all permissions are granted. If this is not done, the extension will not have permission to execute content scripts. +### Building the extension + +To build the extension, run: + +```sh +npm install +npm run build +``` + ## Updating redirects -The browser extensions will update the list of redirects by periodically fetching the latest [redirects.json](redirects.json). +The browser extension will update the list of redirects by periodically fetching the latest [redirects.json](redirects.json). Open a pull request to this repo to update the redirects. @@ -40,6 +45,6 @@ New config can be tested by pointing the config url of the extension to your own For example: -``` +```text https://raw.githubusercontent.com/davegallant/rfd-redirect-stripper/my-new-branch/redirects.json ``` diff --git a/extensions/firefox/popup.css b/css/popup.css similarity index 100% rename from extensions/firefox/popup.css rename to css/popup.css diff --git a/extensions/firefox/popup.html b/html/popup.html similarity index 67% rename from extensions/firefox/popup.html rename to html/popup.html index 0bb82af..8dce9ff 100644 --- a/extensions/firefox/popup.html +++ b/html/popup.html @@ -3,14 +3,14 @@