mirror of
https://github.com/davegallant/rfd-redirect-stripper.git
synced 2025-08-05 16:23:40 +00:00
Start to consolidate source code for both browsers
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
|||||||
*.zip
|
*.zip
|
||||||
|
node_modules
|
||||||
|
6
Makefile
6
Makefile
@@ -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*'
|
|
||||||
|
|
21
README.md
21
README.md
@@ -14,21 +14,26 @@ Copy [script.js](./script.js) into Tampermonkey.
|
|||||||
|
|
||||||
## Browser Extensions
|
## Browser Extensions
|
||||||
|
|
||||||
The browser extensions are currently not packaged or published anywhere.
|
The browser extensions is currently not packaged or published anywhere.
|
||||||
|
|
||||||
### Chrome
|
|
||||||
|
|
||||||
To load the chrome extension, clone this repo and load [extensions/chrome](./extensions/chrome/).
|
|
||||||
|
|
||||||
### Firefox
|
### 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.
|
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
|
## 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.
|
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:
|
For example:
|
||||||
|
|
||||||
```
|
```text
|
||||||
https://raw.githubusercontent.com/davegallant/rfd-redirect-stripper/my-new-branch/redirects.json
|
https://raw.githubusercontent.com/davegallant/rfd-redirect-stripper/my-new-branch/redirects.json
|
||||||
```
|
```
|
||||||
|
@@ -3,14 +3,14 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<title>rfd-redirect-stripper</title>
|
<title>rfd-redirect-stripper</title>
|
||||||
<link rel="stylesheet" href="popup.css" />
|
<link rel="stylesheet" href="../css/popup.css" />
|
||||||
<script src="utils.js"></script>
|
<script src="../js/utils.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
Config URL:
|
Config URL:
|
||||||
<input type="text" id="input-field" />
|
<input type="text" id="input-field" />
|
||||||
<button id="save-button">Save</button>
|
<button id="save-button">Save</button>
|
||||||
<button id="reset-button">Reset</button>
|
<button id="reset-button">Reset</button>
|
||||||
<script src="popup.js"></script>
|
<script src="../js/popup.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
@@ -6,17 +6,23 @@
|
|||||||
"content_scripts": [
|
"content_scripts": [
|
||||||
{
|
{
|
||||||
"matches": ["*://forums.redflagdeals.com/*"],
|
"matches": ["*://forums.redflagdeals.com/*"],
|
||||||
"js": ["content.js"],
|
"js": ["js/content.js"],
|
||||||
"run_at": "document_end"
|
"run_at": "document_end"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"action": {
|
"action": {
|
||||||
"default_icon": "icon.png",
|
"default_icon": "icon.png",
|
||||||
"default_popup": "popup.html"
|
"default_popup": "html/popup.html"
|
||||||
},
|
},
|
||||||
"background": {
|
"background": {
|
||||||
"scripts": ["utils.js", "background.js"]
|
"scripts": ["js/utils.js", "js/background.js"]
|
||||||
},
|
},
|
||||||
"permissions": ["scripting", "storage"],
|
"permissions": ["scripting", "storage"],
|
||||||
"host_permissions": ["*://forums.redflagdeals.com/*"]
|
"host_permissions": ["*://forums.redflagdeals.com/*"],
|
||||||
|
"browser_specific_settings": {
|
||||||
|
"gecko": {
|
||||||
|
"id": "davegallant@gmail.com",
|
||||||
|
"strict_min_version": "42.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
5527
package-lock.json
generated
Normal file
5527
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
11
package.json
Normal file
11
package.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"devDependencies": {
|
||||||
|
"web-ext": "^7.6.0"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"start:firefox": "web-ext run --source-dir .",
|
||||||
|
"build": "web-ext build --overwrite-dest --ignore-files extensions/ --source-dir .",
|
||||||
|
"lint": "web-ext lint --source-dir .",
|
||||||
|
"sign": "web-ext sign --source-dir ."
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user