Skip to content

Commit f7b329c

Browse files
tweak
1 parent a5b0d06 commit f7b329c

File tree

1 file changed

+13
-18
lines changed

1 file changed

+13
-18
lines changed

js/generic.js

+13-18
Original file line numberDiff line numberDiff line change
@@ -422,12 +422,10 @@ const get_isRecursion = () => new Promise(resolve => {
422422
})
423423

424424
const get_isSystemFont = () => new Promise(resolve => {
425-
if (!isGecko) {
426-
return resolve()
427-
}
425+
if (!isGecko) {return resolve()}
428426
let t0 = nowFn()
429427
function exit(value) {
430-
log_perf(SECTG, "isSystemFont", t0, "", value)
428+
log_perf(SECTG, 'isSystemFont', t0,'', value)
431429
return resolve()
432430
}
433431
// first aFont per computed family
@@ -440,18 +438,17 @@ const get_isSystemFont = () => new Promise(resolve => {
440438
try {
441439
let el = dom.sysFont, data = []
442440
aFonts.forEach(function(font){
443-
el.style.font = "" // always clear in case a font is invalid/deprecated
441+
el.style.font = '' // always clear in case a font is invalid/deprecated
444442
el.style.font = font
445-
let family = getComputedStyle(el)["font-family"]
443+
let family = getComputedStyle(el)['font-family']
446444
if (!data.includes(family)) {
447445
data.push(family)
448446
isSystemFont.push(font)
449447
}
450448
})
451-
exit(isSystemFont.join(", "))
449+
exit(isSystemFont.join(', '))
452450
} catch(e) {
453-
// log nothing: we run in fonts later
454-
exit(e.name)
451+
exit(e.name) // log nothing: we run in fonts later
455452
}
456453
})
457454

@@ -471,28 +468,26 @@ const get_isTB = (METRIC) => new Promise(resolve => {
471468
function exit(value) {
472469
isDone = true
473470
try {document.head.removeChild(css)} catch(e) {}
474-
if ("boolean" === typeFn(value)) {isTB = value}
475-
log_perf(SECTG, METRIC, t0, "", value)
471+
if ('boolean' == typeFn(value)) {isTB = value}
472+
log_perf(SECTG, METRIC, t0,'', value)
476473
return resolve(value)
477474
}
478475
// FF121+: 1855861
479476
const get_event = () => new Promise(resolve => {
480477
css.onload = function() {exit(true)}
481478
css.onerror = function() {exit(false)}
482479
})
483-
let css = document.createElement("link")
480+
let css = document.createElement('link')
484481
if (!runSG) {
485482
try {
486483
// note: we do not know the OS yet
487484
// TB13: does not work on android
488485
let path = 'chrome://browser/content/abouttor/aboutTor.css'
489-
// TB14 (added TB13.5)
490-
if (isVer > 127) {
491-
path = 'chrome://global/content/torconnect/aboutTorConnect.css'
492-
}
486+
// TB14 (added TB13.5) .. aaaaaaand still no good on android
487+
//if (isVer > 127) {path = 'chrome://global/content/torconnect/aboutTorConnect.css'}
493488
css.href = path
494-
css.type = "text/css"
495-
css.rel = "stylesheet"
489+
css.type = 'text/css'
490+
css.rel = 'stylesheet'
496491
document.head.appendChild(css)
497492
get_event()
498493
} catch(e) {

0 commit comments

Comments
 (0)