Repository navigation
Search filter: Brave Search, Yahoo and Swisscows; fix DuckDuckGo html - #38
Merged
Merged
Conversation
New engine entries, each read off the live page (October 2026) and checked there with the real extension: a hide rule and a colour rule, the notice, and a real click reaching the marker. - Brave Search: div.snippet[data-type="web"] in #mixed-main. Result and title selectors follow uBlacklist's SERPINFO for Brave (MIT). - Yahoo: #web div.algo with one h3; the regional sites put the link inside the h3, so resultUrl() now takes the heading's link either way. - Swisscows: article.item in .web-results. Searching from its home page shows results without a page load, so an engine can name its `site`: the script stays there, idle, until a results page appears. Its own buttons fill each result's top-right corner, so `markerIn` puts the marker in the footer instead of on top of one. DuckDuckGo html: a search typed on the page POSTs to /html/, leaving no ?q= for the engine test; and opened from a ?q= link, every result link is the protocol-relative //duckduckgo.com/l/?uddg=..., which resultUrl() refused as not absolute. Neither page was filtered at all; both are now. Lite is not covered: each result spans four rows of one table, with no element around them to hide. The hidden count is now taken from the page after every pass instead of kept as a running total. Brave swaps its first results for fresh copies as its script starts, and the running total said "hid 4" over two hidden results; Swisscows replaces one search's results with the next. The colour bar's padding and negative margin are !important as a pair. Yahoo's stylesheet won the margin alone (text pushed 10px right), Bing's won both (bar pressed against the text). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
updateNotice() runs after every pass and rewrote the notice's text (and rebuilt the open "By site" list) each time, even with nothing changed. The notice sits in the page the MutationObserver watches, so each write queued another pass, which wrote it again: while anything was hidden, the filter ran on every animation frame for as long as the page was open. Measured live with the extension loaded: 453 notice mutations in two seconds on a Bing page at rest, on main as well as this branch; 0 after this change, on Bing and Brave. Text is now written only when it differs, and the By site list is rebuilt only when its rows change. The SERP test watches the notice for 200ms at rest on the pages that have a frame clock (headless Chrome draws no frames without one, so the loop cannot show elsewhere). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
codepurse
added a commit
that referenced
this pull request
Oct 30, 2026
Brings in the Google Search cleanup (#36), Brave, Yahoo and Swisscows in the Search Result Filter (#38) and the 1.5.1 release merges. One conflict, in common/changelog.js: both sides added a new entry at the top. Both are kept, 1.6.0 above 1.5.2, so neither release loses its notes. npm test 892, test:pro 59. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A user asked for more engines in the Search Result Filter, citing uBlacklist. This adds Brave Search, Yahoo and Swisscows, and fixes DuckDuckGo's html version, where the filter did nothing at all.
Engines
Each entry was read off the live page (October 2026) and checked there with the real extension loaded: a hide rule, a colour rule, the notice, and a real click reaching the "why?" marker. Afterwards it was checked again in the user's own Chrome.
div.snippet[data-type="web"]in#mixed-main, one.title, direct links. The result and title selectors follow uBlacklist's SERPINFO for Brave (MIT), credited in the code.#web div.algo, oneh3, direct links. Checked on search.yahoo.com, uk. and fr.; the regional sites put the link inside theh3, soresultUrl()now takes the heading's link whether it wraps the heading or sits inside it.article.itemin.web-results, oneh1. Two new optional engine fields:site: searching from Swisscows' home page shows the results without loading a page, so the script stays idle on that host until a results URL appears, instead of quitting on the home page.markerIn: "footer": Swisscows pins its own buttons (like, share, more) absolutely into each result's top-right corner, where the marker floated on top of one.DuckDuckGo html (two bugs, both broken on main)
/html/, so the address has no?q=and the engine test failed. It now accepts/html/.?q=link, every result link is protocol-relative (//duckduckgo.com/l/?uddg=…), andresultUrl()refused anything not starting withhttp, beforeresolvecould unwrap it. It now accepts//…links.Lite is not covered: each result is four
<tr>s of one table with nothing around them to hide, so there is no block for the filter to work on.Fixes found while checking
!importantas a pair. Yahoo's stylesheet won the margin alone, which pushed coloured results 10px to the right; Bing's won both, which left the bar pressed against the text. Measured live afterwards on Bing, DuckDuckGo, DuckDuckGo html, Yahoo, Brave and Swisscows: the text no longer moves.updateNotice()rewrote the notice on every pass, and each write triggered the observer, which queued another pass. While anything was hidden, the filter ran on every animation frame for as long as the page was open: 453 notice mutations in two seconds on a Bing page at rest, on main. It's 0 now. Text is written only when it differs, and the By site list is rebuilt only when its rows change.Tests
npm test: 776 pass.test/search-filter-serp-test.mjsgains seven pages:It also gains a check that the notice is not written at rest. Each new case was confirmed to fail with its fix undone.
Not in this PR
Notes
<all_urls>.