* Fix missing FF favicons Closes #683 I think the combo of swapping `window.prefs` for `prefs`, and moving the function inside `onDOMready()` does the trick. @eight04 Any idea why `window.prefs` no longer works? Does the rest LGTY? * Add suggestions
This commit is contained in:
parent
5f21213693
commit
6e0d073cbf
12
js/dom.js
12
js/dom.js
|
@ -68,14 +68,9 @@ onDOMready().then(() => {
|
||||||
$.remove('#firefox-transitions-bug-suppressor');
|
$.remove('#firefox-transitions-bug-suppressor');
|
||||||
initCollapsibles();
|
initCollapsibles();
|
||||||
focusAccessibility();
|
focusAccessibility();
|
||||||
});
|
if (!chrome.app && chrome.windows && typeof prefs !== 'undefined') {
|
||||||
|
|
||||||
if (!chrome.app && chrome.windows) {
|
|
||||||
// add favicon in Firefox
|
// add favicon in Firefox
|
||||||
setTimeout(() => {
|
prefs.initializing.then(() => {
|
||||||
if (!window.prefs) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const iconset = ['', 'light/'][prefs.get('iconset')] || '';
|
const iconset = ['', 'light/'][prefs.get('iconset')] || '';
|
||||||
for (const size of [38, 32, 19, 16]) {
|
for (const size of [38, 32, 19, 16]) {
|
||||||
document.head.appendChild($create('link', {
|
document.head.appendChild($create('link', {
|
||||||
|
@ -85,7 +80,8 @@ if (!chrome.app && chrome.windows) {
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// set language for CSS :lang and [FF-only] hyphenation
|
// set language for CSS :lang and [FF-only] hyphenation
|
||||||
document.documentElement.setAttribute('lang', chrome.i18n.getUILanguage());
|
document.documentElement.setAttribute('lang', chrome.i18n.getUILanguage());
|
||||||
|
|
Loading…
Reference in New Issue
Block a user