From 2fa009673f3d51b14389f8e25075de394290b32c Mon Sep 17 00:00:00 2001 From: hackademix Date: Fri, 1 Feb 2019 01:13:26 +0100 Subject: Conditional CSS toggle for non-mozilla browsers. --- src/lib/UA.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/lib') diff --git a/src/lib/UA.js b/src/lib/UA.js index 0a751a4..1a1771a 100644 --- a/src/lib/UA.js +++ b/src/lib/UA.js @@ -2,7 +2,11 @@ var UA = { isMozilla: document.URL.startsWith("moz-"), } -if (!UA.isMozilla && typeof chrome === "object" && !chrome.tabs && typeof exportFunction === "undefined") { - // content script shims - window.exportFunction = () => {}; +if (!UA.isMozilla) { + if (typeof chrome === "object" && !chrome.tabs && typeof exportFunction === "undefined") { + // content script shims + window.exportFunction = () => {}; + } +} else { + document.documentElement.classList.add("mozwebext"); } -- cgit v1.2.3