Skip to content

Commit 1338454

Browse files
committed
0.8.25 fix bug
1 parent 84f17e1 commit 1338454

4 files changed

Lines changed: 7 additions & 4 deletions

File tree

g_background.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,13 @@ async function onBeforeRequest_main(details)
121121
// doesn't work if the link target isn't "_blank"
122122
// browser.tabs.update(tabid, {url: detals.url });
123123

124+
var urlEncoder = new URL( chrome.runtime.getURL("redirect.html") );
125+
urlEncoder.searchParams.set("targeturl", details.url);
126+
124127
#ifndef CHROME
125128
await
126129
#endif
127-
browser.tabs.update(tabid, {url: "redirect.html?targeturl=" + encodeURIComponent(details.url) });
130+
browser.tabs.update(tabid, {url: urlEncoder.href });
128131

129132
// on some browser (e.g. Firefox version ~100), if return cancel=true, it will also make above update cancled
130133
if (isChrome)

manifest-chrome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "Auto Referer",
33
"description": "Control referer to protect privacy and not break web",
44
"manifest_version": 2,
5-
"version": "0.8.20",
5+
"version": "0.8.25",
66
"homepage_url": "https://github.com/garywill/autoReferer",
77
"author": {
88
"name": "Garywill",

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "Auto Referer",
33
"description": "Control referer to protect privacy and not break web",
44
"manifest_version": 2,
5-
"version": "0.8.20",
5+
"version": "0.8.25",
66
"homepage_url": "https://garywill.github.io",
77
"developer": {
88
"name": "Garywill",

redirect.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
document.addEventListener("DOMContentLoaded", async function() {
22
const docHref = document.location.href;
33
const urlParser = new URL(docHref);
4-
var targetUrl = decodeURIComponent( urlParser.searchParams.get("targeturl") );
4+
var targetUrl = urlParser.searchParams.get("targeturl") ;
55

66
document.getElementById("a_targetUrl").href = targetUrl;
77
document.getElementById("span_targetUrl").textContent = targetUrl;

0 commit comments

Comments
 (0)