Skip to content

Commit ece8a9e

Browse files
committed
Refactor a little & improve comments
1 parent 276f19c commit ece8a9e

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

MobileOptions.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
/**
22
* Adjusts options page for mobile (Android) compatibility.
33
*
4-
* Notice: You can include this asyncronously even if the whole DOM is not parsed yet.
4+
* Notice: You can include this asyncronously even when the whole DOM is not parsed yet.
55
* It only accesses the body tag and that is very likely available as it's likely one of
6-
* the first HTML tags you write and only include this script afterwards.
6+
* the first HTML tags that is written and this script is obviously included afterwards
7+
* in the head tag.
78
* This prevents unnecessary flackering when the CSS is added and the browser needs to
89
* re-parse/render the HTML.
910
*
@@ -20,11 +21,7 @@
2021
async function isMobile() {
2122
const platformInfo = await browser.runtime.getPlatformInfo();
2223

23-
if (platformInfo.os !== "android") {
24-
return false;
25-
}
26-
27-
return true;
24+
return platformInfo.os === "android";
2825
}
2926

3027
/**

0 commit comments

Comments
 (0)