summaryrefslogtreecommitdiff
path: root/src/lib/UA.js
blob: 438eaf66da00649b0e4bc9db7ae07a0f508a5962 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
var UA = {
  isMozilla: document.URL.startsWith("moz-") || typeof window.wrappedJSObject === "object",
}

if (!UA.isMozilla) {
  if (typeof chrome === "object" && !chrome.tabs && typeof exportFunction === "undefined") {
    // content script shims
    window.exportFunction = () => {};
  }
} else {
  document.documentElement.classList.add("mozwebext");
}