From e2711a3704b93661a66fa5c1f863dec4ec545481 Mon Sep 17 00:00:00 2001 From: Gusted Date: Tue, 6 Apr 2021 16:02:20 +0200 Subject: [PATCH] Use correct URL's --- js/toolbox.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/toolbox.js b/js/toolbox.js index 7d220531..3cb41f1b 100644 --- a/js/toolbox.js +++ b/js/toolbox.js @@ -80,7 +80,7 @@ const URLS = { usoArchiveRaw: 'https://raw.githubusercontent.com/33kk/uso-archive/flomaster/data/', usw: 'https://userstyles.world/', - uswSearch: 'https://userstyles.world/api/search/', + uswIndex: 'https://userstyles.world/api/index/', extractUsoArchiveId: url => url && @@ -425,14 +425,14 @@ function download(url, { }; xhr.onload = () => { if (xhr.status === requiredStatusCode || !requiredStatusCode || u.protocol === 'file:') { - const isUSWSearch = url.startsWith(URLS.uswSearch); + const isUSWIndex = url.startsWith(URLS.uswIndex); const response = expandUsoVars(xhr.response); if (responseHeaders) { const headers = {}; for (const h of responseHeaders) headers[h] = xhr.getResponseHeader(h); resolve({headers, response}); } else { - resolve(isUSWSearch ? response.data : response); + resolve(isUSWIndex ? response.data : response); } } else { reject(xhr.status);