From 2076fe32f2753858446a7fdac7ceff69b059ae16 Mon Sep 17 00:00:00 2001 From: tophf Date: Thu, 8 Apr 2021 05:52:09 +0300 Subject: [PATCH] don't ping uso for usw styles --- popup/search.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/popup/search.js b/popup/search.js index 78ea13be..af71775c 100644 --- a/popup/search.js +++ b/popup/search.js @@ -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);