diff options
Diffstat (limited to 'src/lib/UA.js')
-rw-r--r-- | src/lib/UA.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/UA.js b/src/lib/UA.js new file mode 100644 index 0000000..1a1771a --- /dev/null +++ b/src/lib/UA.js @@ -0,0 +1,12 @@ +var UA = { + isMozilla: document.URL.startsWith("moz-"), +} + +if (!UA.isMozilla) { + if (typeof chrome === "object" && !chrome.tabs && typeof exportFunction === "undefined") { + // content script shims + window.exportFunction = () => {}; + } +} else { + document.documentElement.classList.add("mozwebext"); +} |