diff --git a/popup/popup.js b/popup/popup.js index 4acb18b2..2c2b864f 100644 --- a/popup/popup.js +++ b/popup/popup.js @@ -91,7 +91,7 @@ async function initPopup(frames) { setupLivePrefs(); Object.assign($('#find-styles-link'), { - href: URLS.usoArchive, + href: URLS.usoArchive + 'browse/styles', async onclick(e) { e.preventDefault(); await require(['/popup/search']); diff --git a/popup/search.js b/popup/search.js index d7a560d6..fe590a80 100644 --- a/popup/search.js +++ b/popup/search.js @@ -85,7 +85,11 @@ if (!prefs.get('popup.findStylesInline') || dom.container) { // use a less specific category if the inline search wasn't used yet if (!category) calcCategory({retry: 1}); - a.search = new URLSearchParams({category, search: $('#search-query').value}); + const search = [ + category ? '#' + category : '', + $('#search-query').value, + ].filter(Boolean).join(' '); + a.search = search ? 'search=' + encodeURIComponent(search) : ''; Events.openURLandHide.call(a, event); return; }