|
@@ -297,10 +297,20 @@ export function isFirefoxBelow(targetVersion = "115.9") {
|
|
|
const navigator = window.navigator as any
|
|
|
if (navigator.userAgentData && Array.isArray(navigator.userAgentData.brands)) {
|
|
|
// brands 形如 [{brand: "Chromium", version: "116"}, ...] 或可能被 UA 凭空
|
|
|
+
|
|
|
+ const is360 = navigator.userAgentData.brands.some(item => /Not\(A:Brand/i.test(item.brand))
|
|
|
+ const isQax = navigator.userAgentData.brands.some(item => / Not A;Brand/i.test(item.brand))
|
|
|
+
|
|
|
for (const b of navigator.userAgentData.brands) {
|
|
|
- if (typeof b.brand === "string" && /firefox/i.test(b.brand)) {
|
|
|
- const ver = b.version || "";
|
|
|
- return compareVersionStrings(ver, targetVersion) < 0;
|
|
|
+ if (typeof b.brand !== "string") continue;
|
|
|
+
|
|
|
+ const ver = b.version || "";
|
|
|
+ if (/firefox/i.test(b.brand)) {
|
|
|
+ return compareVersionStrings(ver, '115.9') < 0;
|
|
|
+ } else if (/Chromium/i.test(b.brand)) {
|
|
|
+ const v = is360 ? '108' : isQax ? '108' : '128'
|
|
|
+ console.log('360?', is360, 'qax?', isQax, b.brand, '要求:', v)
|
|
|
+ return compareVersionStrings(ver, v) < 0;
|
|
|
}
|
|
|
}
|
|
|
}
|