disable user-agent header rewriting and blocking some request headers - firefox-fix-web - Firefox extension: fix web
HTML git clone git://git.codemadness.org/firefox-fix-web
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit df5a0a84acf2b45da28766c4c37eb3b8ac5ed04a
DIR parent 88329a62da6c8a2d5d9e06aeee56fed1a0996c0f
HTML Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 19 Apr 2026 13:38:13 +0200
disable user-agent header rewriting and blocking some request headers
It breaks many sites that use Cloudflare (clownflare) and captcha challenges.
(lichess.org also uses it now on the login page)
Diffstat:
M extension/background.js | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
---
DIR diff --git a/extension/background.js b/extension/background.js
@@ -1,19 +1,25 @@
+// !!!
+// NOTE: this file is disabled for now. It breaks many sites that use Cloudflare as the login.
+
/* what this file does:
- rewrites User-Agent headers.
- sets consent cookie for Google and Youtube. */
function main(info) {
+// https://www.useragents.me/#most-common-desktop-useragents-json-csv
+
/* get current running Firefox version, to always keep up-to-date */
-var ff_version = info.version || "72.0";
+var ff_version = info.version || "136.0";
/* User-Agent's */
// Windows 7 (64-bit)
-var ua_windows7 = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:" + ff_version + ") Gecko/20100101 Firefox/" + ff_version;
+//var ua_windows7 = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:" + ff_version + ") Gecko/20100101 Firefox/" + ff_version;
// Windows 10 (64-bit)
var ua_windows10 = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:" + ff_version + ") Gecko/20100101 Firefox/" + ff_version;
// Windows 10 Chrome, NOTE: update version manually if needed.
-var ua_windows10_chrome = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36";
+//var ua_windows10_chrome = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36";
+//var ua_windows10_chrome = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36";
// OpenBSD amd64
var ua_openbsd = "Mozilla/5.0 (X11; OpenBSD amd64; rv:" + ff_version + ") Gecko/20100101 Firefox/" + ff_version;
@@ -81,6 +87,7 @@ function google_forced_consent(e) {
return { requestHeaders: headers };
}
+/*
chrome.webRequest.onBeforeSendHeaders.addListener(
google_forced_consent,
{
@@ -104,3 +111,4 @@ chrome.webRequest.onBeforeSendHeaders.addListener(
}
browser.runtime.getBrowserInfo().then(main);
+*/