Add popup that allows modifying the config url

This commit is contained in:
Dave Gallant
2023-04-08 00:04:33 -04:00
parent 5a58a92460
commit c72db40f7d
13 changed files with 262 additions and 31 deletions

View File

@@ -20,11 +20,10 @@ function stripRedirect(URL, redirectRegex) {
function stripRedirects() {
var Links = document.querySelectorAll("a.postlink, a.autolinker_link");
browser.storage.local.get("rfd-redirects", function (redirectRegex) {
browser.storage.local.get("redirects", function (result) {
Links.forEach(function (Link) {
var ReferralURL = Link.href;
Link.href = stripRedirect(ReferralURL, redirectRegex["rfd-redirects"]);
Link.href = stripRedirect(ReferralURL, result["redirects"]);
});
});
}