This commit is contained in:
tophf 2021-04-07 11:01:54 +03:00 committed by GitHub
parent f856dfb010
commit c89864490c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -414,7 +414,7 @@
saveScrollPosition(entry); saveScrollPosition(entry);
installButton.disabled = true; installButton.disabled = true;
entry.style.setProperty('pointer-events', 'none', 'important'); entry.style.setProperty('pointer-events', 'none', 'important');
// FIXME: move this to background page and create an API like installUSOStyle // FIXME: move this to background page and create an API like installUSOStyle
result.pingbackTimer = setTimeout(download, PINGBACK_DELAY, result.pingbackTimer = setTimeout(download, PINGBACK_DELAY,
`${URLS.uso}styles/install/${id}?source=stylish-ch`); `${URLS.uso}styles/install/${id}?source=stylish-ch`);
@ -485,10 +485,10 @@
index = index.concat(res.filter(res => res.f === 'uso')); index = index.concat(res.filter(res => res.f === 'uso'));
}).catch(() => {}), }).catch(() => {}),
download(USW_INDEX_URL, {responseType: 'json'}).then(res => { download(USW_INDEX_URL, {responseType: 'json'}).then(res => {
res.data.map(style => { for (const style of res.data) {
style.isUsw = true; style.isUsw = true;
}); index.push(style);
index = index.concat(res.data); }
}).catch(() => {}), }).catch(() => {}),
]); ]);
clearTimeout(timer); clearTimeout(timer);