don't ping uso for usw styles

This commit is contained in:
tophf 2021-04-08 05:52:09 +03:00 committed by GitHub
parent 5db1dc7bc4
commit 2076fe32f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -411,9 +411,11 @@
saveScrollPosition(entry);
installButton.disabled = true;
entry.style.setProperty('pointer-events', 'none', 'important');
// FIXME: move this to background page and create an API like installUSOStyle
result.pingbackTimer = setTimeout(download, PINGBACK_DELAY,
`${URLS.uso}styles/install/${id}?source=stylish-ch`);
if (!isUsw) {
// FIXME: move this to background page and create an API like installUSOStyle
result.pingbackTimer = setTimeout(download, PINGBACK_DELAY,
`${URLS.uso}styles/install/${id}?source=stylish-ch`);
}
const updateUrl = isUsw ? URLS.makeUswCodeUrl(id) : URLS.makeUsoArchiveCodeUrl(id);