aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--chromium.md6
-rw-r--r--src/assets/javascripts/reddit.js10
-rw-r--r--src/pages/background/background.js2
-rw-r--r--src/pages/errors/instance_offline.html9
-rw-r--r--src/pages/errors/instance_offline.js5
-rw-r--r--src/updates/updates.xml2
6 files changed, 19 insertions, 15 deletions
diff --git a/chromium.md b/chromium.md
index 52464d02..d42d8cf1 100644
--- a/chromium.md
+++ b/chromium.md
@@ -1,5 +1,5 @@
## Linux
-- Download the latest `.crx` file: [libredirect-2.0.0.crx](https://github.com/libredirect/libredirect/releases/download/v2.0.0/libredirect-2.0.0.crx)
+- Download the latest `.crx` file: [libredirect-2.1.0.crx](https://github.com/libredirect/libredirect/releases/download/v2.1.0/libredirect-2.1.0.crx)
- Open `chrome://extensions`
- Enable `dev mode`
- Rerfesh the page
@@ -8,11 +8,11 @@
Updates are automatic
## Windows, MacOS
-- Download the latest release [libredirect-2.0.0.zip](https://github.com/libredirect/libredirect/releases/download/v2.0.0/libredirect-2.0.0.zip)
+- Download the latest release [libredirect-2.1.0.zip](https://github.com/libredirect/libredirect/releases/download/v2.1.0/libredirect-2.1.0.zip)
- Unzip it with `Auto detect subfolder`
- Open `chrome://extensions`
- Enable `dev mode`
-- Click `Load unpacked`. Select and Open `libredirect-2.0.0/`
+- Click `Load unpacked`. Select and Open `libredirect-2.1.0/`
https://user-images.githubusercontent.com/40805353/159987051-8be73cd3-3fdf-4dd0-99d4-8886674fbdb6.mp4
diff --git a/src/assets/javascripts/reddit.js b/src/assets/javascripts/reddit.js
index 58ed813a..90e5a400 100644
--- a/src/assets/javascripts/reddit.js
+++ b/src/assets/javascripts/reddit.js
@@ -240,12 +240,12 @@ function redirect(url, type, initiator) {
if (redditFrontend == 'teddit') {
if (tedditInstancesList.length === 0) return;
let tedditRandomInstance = utils.getRandomInstance(tedditInstancesList);
- return `${tedditRandomInstance}/pics/w:null_${url.pathname.substring(1)}${url.reddit}`;
+ return `${tedditRandomInstance}/pics/w:null_${url.pathname.substring(1)}${url.search}`;
}
if (redditFrontend == 'libreddit') {
if (libredditInstancesList.length === 0) return;
let libredditRandomInstance = utils.getRandomInstance(libredditInstancesList);
- return `${libredditRandomInstance}/img${url.pathname}${url.reddit}`
+ return `${libredditRandomInstance}/img${url.pathname}${url.search}`
}
}
else if (url.host === "redd.it") {
@@ -253,13 +253,13 @@ function redirect(url, type, initiator) {
if (libredditInstancesList.length === 0) return;
let libredditRandomInstance = utils.getRandomInstance(libredditInstancesList);
// https://redd.it/foo => https://libredd.it/comments/foo
- return `${libredditRandomInstance}/comments${url.pathname}${url.reddit}`;
+ return `${libredditRandomInstance}/comments${url.pathname}${url.search}`;
}
if (redditFrontend == 'teddit' && !url.pathname.match(/^\/+[^\/]+\/+[^\/]/)) {
if (tedditInstancesList.length === 0) return;
let tedditRandomInstance = utils.getRandomInstance(tedditInstancesList);
// https://redd.it/foo => https://teddit.net/comments/foo
- return `${tedditRandomInstance}/comments${url.pathname}${url.reddit}`
+ return `${tedditRandomInstance}/comments${url.pathname}${url.search}`
}
}
else if (url.host === 'preview.redd.it') {
@@ -267,7 +267,7 @@ function redirect(url, type, initiator) {
if (redditFrontend == 'libreddit') {
if (libredditInstancesList.length === 0) return;
const libredditRandomInstance = utils.getRandomInstance(libredditInstancesList);
- return `${libredditRandomInstance}/preview/pre${url.pathname}${url.reddit}`;
+ return `${libredditRandomInstance}/preview/pre${url.pathname}${url.search}`;
}
}
diff --git a/src/pages/background/background.js b/src/pages/background/background.js
index 0815096b..87e13ad3 100644
--- a/src/pages/background/background.js
+++ b/src/pages/background/background.js
@@ -139,7 +139,7 @@ browser.tabs.onCreated.addListener(
tab => {
if (tab.incognito) {
incognitoList.push(tab.id);
- if (incognitoList.length == 1) browser.tabs.create({ url: browser.runtime.getURL("/pages/background/incognito.html") });
+ if (incognitoList.length == 1) browser.tabs.create({ url: browser.runtime.getURL("/pages/background/incognito.html"), active: false });
}
}
);
diff --git a/src/pages/errors/instance_offline.html b/src/pages/errors/instance_offline.html
index 4c47997b..3b7e46d5 100644
--- a/src/pages/errors/instance_offline.html
+++ b/src/pages/errors/instance_offline.html
@@ -29,14 +29,13 @@
<body>
<div>
- <p id="message" data-localise="__MSG_instanceOffline__">This instance is offline, you'll be redirected after&nbsp;<span
- id="number">2</span>&nbsp;<x data-localise="__MSG_sec__">seconds</x>
+ <p id="message" data-localise="__MSG_instanceOffline__">This instance is offline, you'll be redirected
+ after&nbsp;<span id="number">2</span>&nbsp;<x data-localise="__MSG_sec__">seconds</x>
</p>
<button id="cancel" data-localise="__MSG_cancel__">Cancel</button>
</div>
- <script src="instance_offline.js"></script>
- <script src="../../assets/javascripts/localise.js"></script>
+ <script src="instance_offline.js" type="module"></script>
</body>
-</html>
+</html> \ No newline at end of file
diff --git a/src/pages/errors/instance_offline.js b/src/pages/errors/instance_offline.js
index ba9dd522..8137ccd0 100644
--- a/src/pages/errors/instance_offline.js
+++ b/src/pages/errors/instance_offline.js
@@ -1,3 +1,6 @@
+import localise from "../../assets/javascripts/localise.js";
+
+
const params = new Proxy(
new URLSearchParams(window.location.search),
{ get: (searchParams, prop) => searchParams.get(prop) }
@@ -18,3 +21,5 @@ document.getElementById("cancel").addEventListener("click", () => {
isCanceled = true;
document.getElementById("message").innerHTML = browser.i18n.getMessage('redirectionCanceled');
})
+
+localise.localisePage(); \ No newline at end of file
diff --git a/src/updates/updates.xml b/src/updates/updates.xml
index c94edc1a..eccf9111 100644
--- a/src/updates/updates.xml
+++ b/src/updates/updates.xml
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
<app appid='oladmjdebphlnjjcnomfhhbfdldiimaf'>
- <updatecheck codebase='https://github.com/libredirect/libredirect/releases/download/v2.0.0/libredirect-2.0.0.crx' version='2.0.0' />
+ <updatecheck codebase='https://github.com/libredirect/libredirect/releases/download/v2.1.0/libredirect-2.1.0.crx' version='2.1.0' />
</app>
</gupdate>