mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-10 05:27:03 +03:00
refine settings usragent check
This commit is contained in:
@@ -13,7 +13,8 @@ async function init() {
|
|||||||
if (window.matchMedia("(prefers-color-scheme: light)")?.matches &&
|
if (window.matchMedia("(prefers-color-scheme: light)")?.matches &&
|
||||||
!(navigator.vendor == "Google Inc." && (navigator.userAgent.includes("Linux") ||
|
!(navigator.vendor == "Google Inc." && (navigator.userAgent.includes("Linux") ||
|
||||||
navigator.userAgent.includes("Windows NT 6") ||
|
navigator.userAgent.includes("Windows NT 6") ||
|
||||||
navigator.userAgent.includes("Mac OS X") && navigator.userAgent.match(/Mac OS X [^)]+/)[0] < "Mac OS X 10_14")))
|
navigator.userAgent.includes("Mac OS X") && navigator.userAgent.match(/Mac OS X [^)]+/)[0] < "Mac OS X 10_14") &&
|
||||||
|
!navigator.userAgent.includes("OPR/") && !navigator.userAgent.includes("Edg/")))
|
||||||
document.documentElement.setAttribute("data-theme", "light");
|
document.documentElement.setAttribute("data-theme", "light");
|
||||||
|
|
||||||
await utils.wait(() => Config.config !== null);
|
await utils.wait(() => Config.config !== null);
|
||||||
|
|||||||
@@ -24,7 +24,8 @@ async function init() {
|
|||||||
if (window.matchMedia("(prefers-color-scheme: light)")?.matches &&
|
if (window.matchMedia("(prefers-color-scheme: light)")?.matches &&
|
||||||
!(navigator.vendor == "Google Inc." && (navigator.userAgent.includes("Linux") ||
|
!(navigator.vendor == "Google Inc." && (navigator.userAgent.includes("Linux") ||
|
||||||
navigator.userAgent.includes("Windows NT 6") ||
|
navigator.userAgent.includes("Windows NT 6") ||
|
||||||
navigator.userAgent.includes("Mac OS X") && navigator.userAgent.match(/Mac OS X [^)]+/)[0] < "Mac OS X 10_14")))
|
navigator.userAgent.includes("Mac OS X") && navigator.userAgent.match(/Mac OS X [^)]+/)[0] < "Mac OS X 10_14") &&
|
||||||
|
!navigator.userAgent.includes("OPR/") && !navigator.userAgent.includes("Edg/")))
|
||||||
document.documentElement.setAttribute("data-theme", "light");
|
document.documentElement.setAttribute("data-theme", "light");
|
||||||
|
|
||||||
// selected tab
|
// selected tab
|
||||||
|
|||||||
Reference in New Issue
Block a user