diff --git a/README.md b/README.md index 12c71ac..8dfbd03 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,9 @@ Copy [script.js](./script.js) into Tampermonkey. ## Browser Extensions -The browser extensions is currently not packaged or published anywhere. +The browser extension is currently not packaged or published anywhere. + +There is currently not support for Chrome. ### Firefox diff --git a/extensions/chrome/background.js b/extensions/chrome/background.js deleted file mode 100644 index 6dd2238..0000000 --- a/extensions/chrome/background.js +++ /dev/null @@ -1,8 +0,0 @@ -importScripts('utils.js'); - -chrome.runtime.onInstalled.addListener(() => { - updateRedirects(); - setDefaultConfig(); -}); - -setInterval(updateRedirects, 1 * 60 * 60 * 1000); diff --git a/extensions/chrome/content.js b/extensions/chrome/content.js deleted file mode 100644 index f3a2fb2..0000000 --- a/extensions/chrome/content.js +++ /dev/null @@ -1,30 +0,0 @@ -function stripRedirect(URL, redirectRegex) { - for (var i = 0; i < redirectRegex.length; i++) { - var rule = redirectRegex[i]; - var result = new RegExp(rule.pattern).exec(URL); - if (result) { - var newURL = result.groups.baseUrl; - try { - return decodeURIComponent(newURL); - } catch (e) { - console.log(e); - return URL; - } - } - } - return URL; -} - -function stripRedirects() { - var Links = document.querySelectorAll("a.postlink, a.autolinker_link"); - - chrome.storage.local.get("rfd-redirects", function (redirectRegex) { - Links.forEach(function (Link) { - var ReferralURL = Link.href; - - Link.href = stripRedirect(ReferralURL, redirectRegex["rfd-redirects"]); - }); - }); -} - -stripRedirects(); diff --git a/extensions/chrome/icon.png b/extensions/chrome/icon.png deleted file mode 100644 index ca71db2..0000000 Binary files a/extensions/chrome/icon.png and /dev/null differ diff --git a/extensions/chrome/manifest.json b/extensions/chrome/manifest.json deleted file mode 100644 index f3b11db..0000000 --- a/extensions/chrome/manifest.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "manifest_version": 3, - "name": "rfd-redirect-stripper", - "description": "Strip tracking redirects on rfd", - "version": "0.1", - "content_scripts": [ - { - "matches": ["*://forums.redflagdeals.com/*"], - "js": ["content.js"], - "run_at": "document_end" - } - ], - "action": { - "default_icon": "icon.png", - "default_popup": "popup.html" - }, - "background": { - "service_worker": "background.js" - }, - "permissions": ["scripting", "storage"], - "host_permissions": ["*://forums.redflagdeals.com/*"] -} diff --git a/extensions/chrome/popup.css b/extensions/chrome/popup.css deleted file mode 100644 index fa7826a..0000000 --- a/extensions/chrome/popup.css +++ /dev/null @@ -1,63 +0,0 @@ -body { - background-color: #282828; - color: #ebdbb2; - font-family: "Font Name", sans-serif; - font-size: 16px; -} - -input[type="text"] { - background-color: #3c3836; - color: #ebdbb2; - border: none; - border-radius: 3px; - padding: 5px; - margin-bottom: 10px; - font-size: 16px; -} - -button#save-button { - background-color: #1e7325; - color: #ebdbb2; - border: none; - border-radius: 3px; - padding: 5px 10px; - font-size: 16px; -} - -button#save-button:hover { - background-color: #83a598; -} - -button#save-button:active { - transform: translateY(1px); - box-shadow: none; -} - -button#save-button:disabled { - background-color: #a89984; - color: #928374; -} - -button#reset-button { - background-color: #458588; - color: #ebdbb2; - border: none; - border-radius: 3px; - padding: 5px 10px; - font-size: 16px; -} - -button#reset-button:hover { - background-color: #83a598; -} - -button#reset-button:active { - transform: translateY(1px); - box-shadow: none; -} - -button#reset-button:disabled { - background-color: #a89984; - color: #928374; -} - diff --git a/extensions/chrome/popup.html b/extensions/chrome/popup.html deleted file mode 100644 index 0bb82af..0000000 --- a/extensions/chrome/popup.html +++ /dev/null @@ -1,16 +0,0 @@ - - -
- -