Conditional CSS toggle for non-mozilla browsers.

This commit is contained in:
hackademix 2019-02-01 01:13:26 +01:00
parent 9b5bd1c775
commit 2fa009673f
1 changed files with 7 additions and 3 deletions

View File

@ -2,7 +2,11 @@ var UA = {
isMozilla: document.URL.startsWith("moz-"), isMozilla: document.URL.startsWith("moz-"),
} }
if (!UA.isMozilla && typeof chrome === "object" && !chrome.tabs && typeof exportFunction === "undefined") { if (!UA.isMozilla) {
if (typeof chrome === "object" && !chrome.tabs && typeof exportFunction === "undefined") {
// content script shims // content script shims
window.exportFunction = () => {}; window.exportFunction = () => {};
} }
} else {
document.documentElement.classList.add("mozwebext");
}