Skip to content

Commit daa69b2

Browse files
committed
Refactor browser-dependent UI CSS.
1 parent d3d18fd commit daa69b2

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/nscl

Submodule nscl updated 1 file

src/ui/ui.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,9 @@ var UI = (() => {
4646
"/nscl/common/Permissions.js",
4747
"/nscl/common/Policy.js",
4848
];
49+
4950
this.mobile = UA.mobile;
50-
let root = document.documentElement;
51-
if (this.mobile) {
52-
root.classList.add("mobile");
53-
}
51+
5452
await include(scripts);
5553

5654
let inited = new Promise(resolve => {
@@ -71,6 +69,8 @@ var UI = (() => {
7169
debug = () => {}; // be quiet!
7270
}
7371
if (UI.local.isTorBrowser) {
72+
Sites.onionSecure = true;
73+
// TODO: replace the following with pure CSS :content in common.css
7474
const label = document.querySelector("span.tor");
7575
if (label) {
7676
const browserName = (await browser.runtime.getBrowserInfo()).name;
@@ -80,8 +80,6 @@ var UI = (() => {
8080
);
8181
}
8282
}
83-
document.documentElement.classList.add("tor");
84-
Sites.onionSecure = true;
8583
}
8684
}
8785
resolve();

0 commit comments

Comments
 (0)