Skip to content

Commit

Permalink
Merge pull request #249 from Write/master
Browse files Browse the repository at this point in the history
Correctly handle native Europresse query
  • Loading branch information
Write authored Sep 2, 2024
2 parents 9a278ea + ebfce3c commit 2652728
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ophirofox/content_scripts/europresse_search.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ async function onLoad() {
path.startsWith("/Search/Advanced") ||
path.startsWith("/Search/AdvancedMobile") ||
path.startsWith("/Search/Express") ||
path.startsWith("/Search/Simple")
path.startsWith("/Search/Simple") ||
path.startsWith("/Search/Result")
)) return;
const { search_terms, published_time } = await consumeReadRequest();
if (!search_terms) return;
Expand All @@ -34,7 +35,8 @@ async function onLoad() {
.split(/[^\p{L}\p{M}\p{Nd}]+/u)
.filter(w => !stopwords.has(w))
.join(' ');
const keyword_field = document.getElementById("Keywords");
const keyword_field_id = path.startsWith("/Search/Result") ? "NativeQuery" : "Keywords";
const keyword_field = document.getElementById(keyword_field_id);
keyword_field.value = 'TIT_HEAD=' + keywords;

// Looking for a time range
Expand Down

0 comments on commit 2652728

Please sign in to comment.