Introduction
Introduction Statistics Contact Development Disclaimer Help
use documentUrl, not originalUrl, still fallback to url. - firefox-fix-web - Fi…
git clone git://git.codemadness.org/firefox-fix-web
Log
Files
Refs
README
LICENSE
---
commit 4962c0571299f0ed3af45630de874b3e333fc543
parent deee659665bec6079694d48833f97070bca5f8f7
Author: Hiltjo Posthuma <[email protected]>
Date: Mon, 23 Mar 2020 13:29:17 +0100
use documentUrl, not originalUrl, still fallback to url.
originUrl seems to be the referer. Noticed when a tweet is referenced by a
link.
Diffstat:
M extension/background.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/extension/background.js b/extension/background.js
@@ -1,5 +1,3 @@
-browser.runtime.getBrowserInfo().then(main);
-
function main(info) {
/* get current running Firefox version, to always keep up-to-date */
@@ -35,7 +33,7 @@ function rewriteua(e) {
if (header.name.toLowerCase() !== "user-agent")
continue;
var ua = ua_default;
- var url = e.originUrl || e.url || "";
+ var url = e.documentUrl || e.url || "";
for (var p of patterns) {
var m = p.re.exec(url);
if (m === null)
@@ -60,3 +58,5 @@ chrome.webRequest.onBeforeSendHeaders.addListener(
);
}
+
+browser.runtime.getBrowserInfo().then(main);
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.