fix USO-archive site search link
This commit is contained in:
parent
e7d5fff736
commit
59cac7a469
|
@ -91,7 +91,7 @@ async function initPopup(frames) {
|
||||||
setupLivePrefs();
|
setupLivePrefs();
|
||||||
|
|
||||||
Object.assign($('#find-styles-link'), {
|
Object.assign($('#find-styles-link'), {
|
||||||
href: URLS.usoArchive,
|
href: URLS.usoArchive + 'browse/styles',
|
||||||
async onclick(e) {
|
async onclick(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
await require(['/popup/search']);
|
await require(['/popup/search']);
|
||||||
|
|
|
@ -85,7 +85,11 @@
|
||||||
if (!prefs.get('popup.findStylesInline') || dom.container) {
|
if (!prefs.get('popup.findStylesInline') || dom.container) {
|
||||||
// use a less specific category if the inline search wasn't used yet
|
// use a less specific category if the inline search wasn't used yet
|
||||||
if (!category) calcCategory({retry: 1});
|
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);
|
Events.openURLandHide.call(a, event);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user