summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimonBrazell <simon@brazell.com.au>2020-02-06 10:19:05 +1100
committerSimonBrazell <simon@brazell.com.au>2020-02-06 10:19:05 +1100
commitd25072f6b54d821b8d8245f78b492eb273017260 (patch)
tree2a986094185be84551e412496a25462a16e3aa69
parented3941ff7281254ddb9a7cb8acef3bbf4c1d5d0f (diff)
downloadprivacy-redirect-d25072f6b54d821b8d8245f78b492eb273017260.tar.gz
privacy-redirect-d25072f6b54d821b8d8245f78b492eb273017260.tar.bz2
privacy-redirect-d25072f6b54d821b8d8245f78b492eb273017260.zip
Fix missing query strings in redirectsv1.1.5
-rw-r--r--background.js10
-rw-r--r--manifest.json2
2 files changed, 6 insertions, 6 deletions
diff --git a/background.js b/background.js
index a328488..bf06841 100644
--- a/background.js
+++ b/background.js
@@ -57,10 +57,10 @@ chrome.storage.onChanged.addListener(changes => {
function redirectBibliogram(url) {
if (url.pathname === '/' || url.pathname.match(instagramPathsRegex)) {
- return bibliogramInstance + url.pathname;
+ return bibliogramInstance + url.pathname + url.search;
} else {
// Redirect user profile requests to '/u/...'
- return `${bibliogramInstance}/u${url.pathname}`;
+ return `${bibliogramInstance}/u${url.pathname}${url.search}`;
}
}
@@ -71,13 +71,13 @@ chrome.webRequest.onBeforeRequest.addListener(
if (url.host.match(youtubeRegex)) {
if (!disableInvidious) {
redirect = {
- redirectUrl: invidiousInstance + url.pathname
+ redirectUrl: invidiousInstance + url.pathname + url.search
};
}
} else if (url.host.match(twitterRegex)) {
if (!disableNitter) {
redirect = {
- redirectUrl: nitterInstance + url.pathname
+ redirectUrl: nitterInstance + url.pathname + url.search
};
}
} else if (url.host.match(instagramRegex)) {
@@ -89,7 +89,7 @@ chrome.webRequest.onBeforeRequest.addListener(
}
if (redirect) {
console.log(
- 'Redirecting', `"${url.host}"`, '=>', `"${redirect.redirectUrl}"`
+ 'Redirecting', `"${url.toString()}"`, '=>', `"${redirect.redirectUrl}"`
);
console.log('Details', details);
}
diff --git a/manifest.json b/manifest.json
index 315ec5e..48cdc43 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,7 +1,7 @@
{
"name": "Privacy Redirect",
"description": "Redirects Twitter, Youtube & Instagram requests to privacy friendly alternatives - Nitter, Invidious, & Bibliogram.",
- "version": "1.1.4",
+ "version": "1.1.5",
"manifest_version": 2,
"background": {
"scripts": [