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?
This commit is contained in:
narcolepticinsomniac 2019-03-25 04:27:43 -04:00 committed by GitHub
parent 5f21213693
commit adc43a89e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,12 +68,10 @@ onDOMready().then(() => {
$.remove('#firefox-transitions-bug-suppressor'); $.remove('#firefox-transitions-bug-suppressor');
initCollapsibles(); initCollapsibles();
focusAccessibility(); focusAccessibility();
});
if (!chrome.app && chrome.windows) { if (!chrome.app && chrome.windows) {
// add favicon in Firefox // add favicon in Firefox
setTimeout(() => { setTimeout(() => {
if (!window.prefs) { if (!prefs) {
return; return;
} }
const iconset = ['', 'light/'][prefs.get('iconset')] || ''; const iconset = ['', 'light/'][prefs.get('iconset')] || '';
@ -86,6 +84,7 @@ 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());