load favicons earlier + show bads as ?

This commit is contained in:
tophf 2022-02-23 05:52:04 +03:00
parent f5b2fe2fc6
commit 51e9b09f52
4 changed files with 17 additions and 4 deletions

View File

@ -480,9 +480,9 @@ const dom = {};
prefs.ready.then(() => { prefs.ready.then(() => {
waitForSelector('details[data-pref]', {recur: Collapsible.bindEvents}); waitForSelector('details[data-pref]', {recur: Collapsible.bindEvents});
}); });
window.on('load', () => { window.requestIdleCallback(() => {
require(lazyScripts); require(lazyScripts);
}, {once: true}); });
})(); })();
//#endregion //#endregion

View File

@ -678,6 +678,18 @@ button .svg-icon,
filter: none; filter: none;
} }
.newUI .target b::after {
content: '?';
margin-left: -20px;
position: absolute;
background: var(--c85);
width: 16px;
height: 16px;
text-align: center;
border-radius: 50%;
color: var(--bg);
}
/* Default, no update buttons */ /* Default, no update buttons */
.updater-icons .update, .updater-icons .update,
.updater-icons .check-update { .updater-icons .check-update {

View File

@ -100,11 +100,11 @@ newUI.renderClass();
showStyles(styles, ids); showStyles(styles, ids);
window.on('load', () => require([ setTimeout(require, 0, [
'/manage/import-export', '/manage/import-export',
'/manage/incremental-search', '/manage/incremental-search',
'/manage/updater-ui', '/manage/updater-ui',
]), {once: true}); ]);
})(); })();
msg.onExtension(onRuntimeMessage); msg.onExtension(onRuntimeMessage);

View File

@ -263,6 +263,7 @@ async function getFaviconSrc(container = installed) {
favicon = favicon ? favicon[1].replace(/\W+$/, '') : ''; favicon = favicon ? favicon[1].replace(/\W+$/, '') : '';
} }
if (!favicon || badFavs && badFavs.includes(favicon)) { if (!favicon || badFavs && badFavs.includes(favicon)) {
if (!target.firstElementChild) target.prepend($create('b'));
continue; continue;
} }
if (favicon !== OWN_ICON) { if (favicon !== OWN_ICON) {