about summary refs log tree commit diff stats
path: root/src/pages/popup
diff options
context:
space:
mode:
Diffstat (limited to 'src/pages/popup')
-rw-r--r--src/pages/popup/popup.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/pages/popup/popup.js b/src/pages/popup/popup.js
index 0e5a3d4b..777733f7 100644
--- a/src/pages/popup/popup.js
+++ b/src/pages/popup/popup.js
@@ -7,15 +7,17 @@ import utils from "../../assets/javascripts/utils.js"
 document.getElementById("more-options").href = browser.runtime.getURL("pages/options/index.html")
 document.getElementById("more-options").setAttribute('target', '_blank')
 
-const os = (await browser.runtime.getPlatformInfo()).os
-
-switch (os) {
-	case "fuchsia":
-	case "ios":
-	case "android": {
-		document.getElementsByTagName("html")[0].classList.add("mobile")
+await browser.runtime.getPlatformInfo(r => {
+	switch (r.os) {
+		case "fuchsia":
+		case "ios":
+		case "android": {
+			document.getElementsByTagName("html")[0].classList.add("mobile")
+		}
 	}
 }
+)
+
 
 const allSites = document.getElementById("all_sites")
 const currSite = document.getElementById("current_site")