Skip to content

Commit 61b2344

Browse files
tweak
1 parent f800339 commit 61b2344

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

js/generic.js

+19-15
Original file line numberDiff line numberDiff line change
@@ -365,38 +365,32 @@ const get_isOS = () => new Promise(resolve => {
365365
return resolve()
366366
}
367367
// FF124+: 1874232: this method is obsolete
368+
369+
let t0 = nowFn(), count = 0
370+
const METRIC = "isOS"
368371
if (isVer > 123) {
369-
// temp return: we need to find another method
370-
return resolve()
372+
exit()
371373
}
372374

373-
let t0 = nowFn(), count = 0
374375
setTimeout(() => resolve(zErrTime), 100)
375-
const METRIC = "isOS"
376376
function exit() {
377377
// FF51+ win/mac 1280128 / FF89+ linux 1701257 : min gecko > 88 so undefined = android
378378
if (isOS === undefined) {
379-
// temp: while we don't have a 124 isVer, see return above for < 123
379+
// temp: while we don't have a 124 isVer, see return above for > 123
380380
// if undefined assume it's broken, sorry android 123 users but at least desktop 123 works
381381
if (isVerExtra == "+") {
382+
//isOS = "android" // testing
383+
log_perf(SECTG, METRIC, t0, "", isOS+"")
382384
return resolve()
383385
} else {
384386
isOS = "android"
387+
return resolve()
385388
}
386389
}
390+
//isOS = "android"
387391
// set icon
388392
let pngURL = "url('chrome://branding/content/"+ (isOS == "android" ? "fav" : "") + "icon64.png')"
389393
dom.fdResourceCss.style.backgroundImage = pngURL
390-
// tweak monospace size
391-
if (isOS === "windows" || isOS == "android") {
392-
try {
393-
let items = document.querySelectorAll('.mono')
394-
for (let i=0; i < items.length; i++) {
395-
items[i].classList.add("monobigger")
396-
items[i].classList.remove("mono")
397-
}
398-
} catch(e) {}
399-
}
400394
log_perf(SECTG, METRIC, t0, "", isOS)
401395
return resolve()
402396
}
@@ -1394,6 +1388,16 @@ function countJS(filename) {
13941388
log_perf(SECTG, METRIC, t0, "", zErrTime)
13951389
log_alert(SECTG, METRIC +": "+ zErrTime, true)
13961390
}
1391+
// tweak monospace size: ToDo: this is bad design
1392+
if (isOS === "windows" || isOS == "android") {
1393+
try {
1394+
let items = document.querySelectorAll('.mono')
1395+
for (let i=0; i < items.length; i++) {
1396+
items[i].classList.add("monobigger")
1397+
items[i].classList.remove("mono")
1398+
}
1399+
} catch(e) {}
1400+
}
13971401
// do once
13981402
let target = dom.pointertarget
13991403
target.addEventListener("pointerover", (event) => {

0 commit comments

Comments
 (0)