Skip to content

Commit 6656c08

Browse files
authored
Update generate-userscript.sh
1 parent e71b36d commit 6656c08

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

generate-userscript.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@ done <<< "$europress_urls"
221221
path.startsWith("/Search/Advanced") ||
222222
path.startsWith("/Search/AdvancedMobile") ||
223223
path.startsWith("/Search/Express") ||
224-
path.startsWith("/Search/Simple")
224+
path.startsWith("/Search/Simple") ||
225+
path.startsWith("/Search/Result")
225226
)) return;
226227
227228
const readRequest = await consumeReadRequest();
@@ -236,8 +237,9 @@ done <<< "$europress_urls"
236237
.filter(w => !stopwords.has(w))
237238
.join('\'' '\'');
238239
240+
const keyword_field_id = path.startsWith("/Search/Result") ? "NativeQuery" : "Keywords";
239241
240-
onElemAvailable('\''#Keywords'\'').then((selector) => {
242+
onElemAvailable('\''#'\'' + keyword_field_id).then((selector) => {
241243
const keyword_field = selector;
242244
keyword_field.value = '\''TIT_HEAD='\'' + keywords;
243245
keyword_field.form.submit();

0 commit comments

Comments
 (0)