fix USO-archive site search link
This commit is contained in:
parent
e7d5fff736
commit
59cac7a469
|
@ -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']);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user