Refactor browser-dependent UI CSS.
This commit is contained in:
parent
d3d18fdbc1
commit
daa69b22c2
2
src/nscl
2
src/nscl
|
@ -1 +1 @@
|
||||||
Subproject commit 095d75584b9c19203bada0b09d6b05e5f1f15edb
|
Subproject commit 6190ad1d4288385aa1062af35fd62807c2f6ab2d
|
10
src/ui/ui.js
10
src/ui/ui.js
|
@ -46,11 +46,9 @@ var UI = (() => {
|
||||||
"/nscl/common/Permissions.js",
|
"/nscl/common/Permissions.js",
|
||||||
"/nscl/common/Policy.js",
|
"/nscl/common/Policy.js",
|
||||||
];
|
];
|
||||||
|
|
||||||
this.mobile = UA.mobile;
|
this.mobile = UA.mobile;
|
||||||
let root = document.documentElement;
|
|
||||||
if (this.mobile) {
|
|
||||||
root.classList.add("mobile");
|
|
||||||
}
|
|
||||||
await include(scripts);
|
await include(scripts);
|
||||||
|
|
||||||
let inited = new Promise(resolve => {
|
let inited = new Promise(resolve => {
|
||||||
|
@ -71,6 +69,8 @@ var UI = (() => {
|
||||||
debug = () => {}; // be quiet!
|
debug = () => {}; // be quiet!
|
||||||
}
|
}
|
||||||
if (UI.local.isTorBrowser) {
|
if (UI.local.isTorBrowser) {
|
||||||
|
Sites.onionSecure = true;
|
||||||
|
// TODO: replace the following with pure CSS :content in common.css
|
||||||
const label = document.querySelector("span.tor");
|
const label = document.querySelector("span.tor");
|
||||||
if (label) {
|
if (label) {
|
||||||
const browserName = (await browser.runtime.getBrowserInfo()).name;
|
const browserName = (await browser.runtime.getBrowserInfo()).name;
|
||||||
|
@ -80,8 +80,6 @@ var UI = (() => {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
document.documentElement.classList.add("tor");
|
|
||||||
Sites.onionSecure = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
resolve();
|
resolve();
|
||||||
|
|
Loading…
Reference in New Issue