1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-12-22 04:40:20 +01:00

Added {real Firefox version - rv} to Firefox navigator preset

Fixes #641
This commit is contained in:
kkapsner 2023-03-18 14:44:44 +01:00
parent 34bc1730a1
commit 8d3f489d11
3 changed files with 8 additions and 1 deletions

View File

@ -26,6 +26,7 @@
original[property] = window.navigator[property];
});
original["real Firefox version"] = window.navigator.userAgent.replace(/^.+Firefox\//, "");
original["real Firefox version - rv"] = window.navigator.userAgent.replace(/^.+; rv:([\d.]+).*$/, "$1");
let changedValues = {};

View File

@ -277,6 +277,7 @@
chromeVersion: "71.0.3578.98",
edgeVersion: "17.17134",
firefoxVersion: undefined,
firefoxVersionVR: undefined,
operaVersion: undefined,
safariVersion: undefined,
@ -293,6 +294,7 @@
chromeVersion: "71.0.3578.98",
edgeVersion: undefined,
firefoxVersion: undefined,
firefoxVersionVR: undefined,
operaVersion: "58.0.3135.65",
safariVersion: undefined,
@ -309,6 +311,7 @@
chromeVersion: "71.0.3578.98",
edgeVersion: undefined,
firefoxVersion: undefined,
firefoxVersionVR: undefined,
operaVersion: undefined,
safariVersion: undefined,
@ -325,6 +328,7 @@
chromeVersion: undefined,
edgeVersion: undefined,
firefoxVersion: undefined,
firefoxVersionVR: undefined,
operaVersion: undefined,
safariVersion: "12.0.3",
@ -341,6 +345,7 @@
chromeVersion: undefined,
edgeVersion: undefined,
firefoxVersion: "{real Firefox version}",
firefoxVersionRV: "{real Firefox version - rv}",
operaVersion: undefined,
safariVersion: undefined,
@ -350,7 +355,7 @@
return firefoxOscpu[currentProperties.osPreset || ""] || "{original value}";
},
productSub: "20100101",
userAgent: "Mozilla/5.0 ({platformDetails}; rv:{firefoxVersion}) Gecko/20100101 Firefox/{firefoxVersion}",
userAgent: "Mozilla/5.0 ({platformDetails}; rv:{firefoxVersionRV}) Gecko/20100101 Firefox/{firefoxVersion}",
vendor: undefined,
}
};

View File

@ -5,6 +5,7 @@ Version 1.9:
new features:
- added support for wildcards (*) in domains
- added {real Firefox version - rv} to Firefox navigator preset
fixes:
- errors in URL regular expressions broke CB