preload nearby favicons
This commit is contained in:
parent
62974751ff
commit
ce7137c54d
|
@ -79,7 +79,7 @@ const Events = {
|
||||||
expandTargets(event, entry) {
|
expandTargets(event, entry) {
|
||||||
if (!entry._allTargetsRendered) {
|
if (!entry._allTargetsRendered) {
|
||||||
createTargetsElement({entry, expanded: true});
|
createTargetsElement({entry, expanded: true});
|
||||||
setTimeout(getFaviconSrc, 0, entry);
|
getFaviconSrc(entry);
|
||||||
}
|
}
|
||||||
this.closest('.applies-to').classList.toggle('expanded');
|
this.closest('.applies-to').classList.toggle('expanded');
|
||||||
},
|
},
|
||||||
|
|
|
@ -31,7 +31,7 @@ const AGES = [
|
||||||
delete el.dataset.src;
|
delete el.dataset.src;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}, {rootMargin: '200px'});
|
||||||
Object.defineProperty(proto, 'src', Object.assign({}, pSrc, {
|
Object.defineProperty(proto, 'src', Object.assign({}, pSrc, {
|
||||||
set(val) {
|
set(val) {
|
||||||
if (this.loading === 'lazy') {
|
if (this.loading === 'lazy') {
|
||||||
|
@ -87,7 +87,6 @@ function createStyleElement({style, name: nameLC}) {
|
||||||
infoVer: $('[data-type=version]', entry),
|
infoVer: $('[data-type=version]', entry),
|
||||||
appliesTo: $('.applies-to', entry),
|
appliesTo: $('.applies-to', entry),
|
||||||
targets: $('.targets', entry),
|
targets: $('.targets', entry),
|
||||||
expander: $('.expander', entry),
|
|
||||||
decorations: {
|
decorations: {
|
||||||
urlPrefixesAfter: '*',
|
urlPrefixesAfter: '*',
|
||||||
regexpsBefore: '/',
|
regexpsBefore: '/',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user