aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManeraKai <manerakai@protonmail.com>2022-06-16 11:37:42 +0300
committerManeraKai <manerakai@protonmail.com>2022-06-16 11:37:42 +0300
commit4c4c47e82f6f0cd3ec5861f6903f721d16d94aa8 (patch)
treefc542fe73908db95da3d752f7ae553b7459946aa
parentupdate instances (diff)
downloadlibredirect-4c4c47e82f6f0cd3ec5861f6903f721d16d94aa8.zip
Fixed small things. apparently Fixed Instances got fixed #337
Diffstat (limited to '')
-rw-r--r--src/assets/javascripts/imdb.js2
-rw-r--r--src/assets/javascripts/maps.js2
-rw-r--r--src/assets/javascripts/reuters.js2
-rw-r--r--src/assets/javascripts/utils.js2
-rw-r--r--src/instances/blocklist.json49
-rw-r--r--src/manifest.json2
-rw-r--r--src/pages/background/background.js5
-rw-r--r--src/pages/options/widgets/general.js11
8 files changed, 14 insertions, 61 deletions
diff --git a/src/assets/javascripts/imdb.js b/src/assets/javascripts/imdb.js
index 9b0efe42..a388660b 100644
--- a/src/assets/javascripts/imdb.js
+++ b/src/assets/javascripts/imdb.js
@@ -133,7 +133,7 @@ function initDefaults() {
let dataJson = JSON.parse(data);
redirects.libremdb = dataJson.libremdb;
browser.storage.local.set({
- disableImdb: false,
+ disableImdb: true,
imdbProtocol: "normal",
imdbRedirects: redirects,
diff --git a/src/assets/javascripts/maps.js b/src/assets/javascripts/maps.js
index 7d886eaa..57add6f8 100644
--- a/src/assets/javascripts/maps.js
+++ b/src/assets/javascripts/maps.js
@@ -8,7 +8,7 @@ const targets = /^https?:\/{2}(((www|maps)\.)?(google\.).*(\/maps)|maps\.(google
let redirects = {
'osm': {
"normal": [
- "https://openstreetmap.org"
+ "https://www.openstreetmap.org"
]
},
'facil': {
diff --git a/src/assets/javascripts/reuters.js b/src/assets/javascripts/reuters.js
index 9afb67a9..1af81495 100644
--- a/src/assets/javascripts/reuters.js
+++ b/src/assets/javascripts/reuters.js
@@ -86,7 +86,7 @@ function redirect(url, type, initiator) {
function initDefaults() {
return new Promise(resolve => {
browser.storage.local.set({
- disableReuters: false,
+ disableReuters: true,
reutersProtocol: "normal",
reutersRedirects: redirects,
diff --git a/src/assets/javascripts/utils.js b/src/assets/javascripts/utils.js
index 0b8bfe41..ac22ed79 100644
--- a/src/assets/javascripts/utils.js
+++ b/src/assets/javascripts/utils.js
@@ -49,7 +49,7 @@ function updateInstances() {
searchHelper.setRedirects({ 'searx': instances.searx, 'searxng': instances.searxng, 'whoogle': instances.whoogle });
wikipediaHelper.setRedirects(instances.wikiless);
mediumHelper.setRedirects(instances.scribe);
- quoraHelper.setRedirects(instances.query);
+ quoraHelper.setRedirects(instances.quetre);
libremdbHelper.setRedirects(instances.libremdb);
sendTargetsHelper.setRedirects(instances.send);
tiktokHelper.setRedirects(instances.proxiTok);
diff --git a/src/instances/blocklist.json b/src/instances/blocklist.json
deleted file mode 100644
index 8b7fc62a..00000000
--- a/src/instances/blocklist.json
+++ /dev/null
@@ -1,49 +0,0 @@
-[
- "https://invidious.kavin.rocks",
- "https://invidious.lunar.icu",
- "https://piped.kavin.rocks",
- "https://piped.tokhmi.xyz",
- "https://piped.moomoo.me",
- "https://piped.syncpundit.com",
- "https://piped.mha.fi",
- "https://piped.shimul.me",
- "https://nitter.nixnet.services",
- "https://nitter.domain.glass",
- "https://birdsite.xanny.family",
- "https://nitter.moomoo.me",
- "https://notabird.site",
- "https://fuckthesacklers.network",
- "https://nitter.govt.land",
- "https://nitter.winscloud.net",
- "https://twtr.bch.bar",
- "https://nitter.lunar.icu",
- "https://twitter.dr460nf1r3.org",
- "https://bib.actionsack.com",
- "https://libreddit.domain.glass",
- "https://r.nf",
- "https://libreddit.flux.industries",
- "https://lr.oversold.host",
- "https://libreddit.hu",
- "https://lr.stilic.ml",
- "https://reddi.tk",
- "https://r.walkx.org",
- "https://libreddit.yonalee.eu",
- "https://libreddit.winscloud.net",
- "https://libreddit.lunar.icu",
- "https://r.ahwx.org",
- "https://reddit.dr460nf1r3.org",
- "https://teddit.domain.glass",
- "https://wiki.604kph.xyz",
- "https://wikiless.lunar.icu",
- "https://lingva.lunar.icu",
- "https://searx.josie.lol",
- "https://searx.org",
- "https://searx.run",
- "https://searx.albony.xyz",
- "https://search.albony.xyz",
- "https://search.garudalinux.org",
- "https://search.dr460nf1r3.org",
- "https://whoogle.lunar.icu",
- "https://rimgo.lunar.icu",
- "https://i.actionsack.com"
-] \ No newline at end of file
diff --git a/src/manifest.json b/src/manifest.json
index d52bc347..fa292506 100644
--- a/src/manifest.json
+++ b/src/manifest.json
@@ -1,7 +1,7 @@
{
"name": "__MSG_extensionName__",
"description": "__MSG_extensionDescription__",
- "version": "2.1.0",
+ "version": "2.2.0",
"manifest_version": 2,
"browser_specific_settings": {
"gecko": {
diff --git a/src/pages/background/background.js b/src/pages/background/background.js
index e3e34f85..d6c81f20 100644
--- a/src/pages/background/background.js
+++ b/src/pages/background/background.js
@@ -31,7 +31,6 @@ browser.runtime.onInstalled.addListener(
fetch('/instances/blacklist.json').then(response => response.text()).then(async data => {
browser.storage.local.clear(
() => {
-
browser.storage.local.set({ cloudflareBlackList: JSON.parse(data).cloudflare },
() => {
browser.storage.local.set({ authenticateBlackList: JSON.parse(data).authenticate },
@@ -60,6 +59,10 @@ browser.runtime.onInstalled.addListener(
});
})
};
+ function initDefault(){
+
+ }
+
// if (details.reason == 'install') {
if (details.reason == 'install' || (details.reason == "update" && details.previousVersion != browser.runtime.getManifest().version)) {
if (details.reason == "update")
diff --git a/src/pages/options/widgets/general.js b/src/pages/options/widgets/general.js
index a4c5c9d2..0daeb90e 100644
--- a/src/pages/options/widgets/general.js
+++ b/src/pages/options/widgets/general.js
@@ -16,6 +16,7 @@ import wikipediaHelper from "../../../assets/javascripts/wikipedia.js";
import mediumHelper from "../../../assets/javascripts/medium.js";
import quoraHelper from "../../../assets/javascripts/quora.js";
import libremdbHelper from "../../../assets/javascripts/imdb.js";
+import reutersHelper from "../../../assets/javascripts/reuters.js";
import imgurHelper from "../../../assets/javascripts/imgur.js";
import tiktokHelper from "../../../assets/javascripts/tiktok.js";
import sendTargetsHelper from "../../../assets/javascripts/sendTargets.js";
@@ -23,14 +24,12 @@ import peertubeHelper from "../../../assets/javascripts/peertube.js";
import lbryHelper from "../../../assets/javascripts/lbry.js";
let updateInstancesElement = document.getElementById("update-instances");
-updateInstancesElement.addEventListener("click", () => {
+updateInstancesElement.addEventListener("click", async () => {
let oldHtml = updateInstancesElement.innerHTML
updateInstancesElement.innerHTML = '...';
- if (utils.updateInstances()) {
- updateInstancesElement.innerHTML = 'Done!';
- new Promise(resolve => setTimeout(resolve, 1500)).then( // sleep 1500ms
- () => updateInstancesElement.innerHTML = oldHtml
- )
+ if (await utils.updateInstances()) {
+ updateInstancesElement.innerHTML = oldHtml;
+ location.reload();
}
else
updateInstancesElement.innerHTML = 'Failed Miserabely';