A bookmark can save how you research, not just where you go

Introduction
I added bookmark plugins to bmux. A saved Reddit search can now carry minimum score and comment counts, plus rules for hiding duplicate results. Opening the bookmark applies those settings to the page.
The screenshot above is cropped from the filter overlay on a live Reddit search in bmux. Both minimums are set to two, with both thresholds required and duplicate filtering enabled.
bmux already lets me edit a saved search's URL parameters. That works for filters the website supports in its address. Page scripts add another option: change how the loaded results are displayed, without requiring the website to support that filter.
The development work was mostly about where those settings belong and which page should receive them. I wanted the behavior attached to a particular saved search, with a way to change it or turn it off.
Separate the search request from the result display
A search URL describes a request to the website. A local filter operates on the response after it has loaded. They have different limits.
For example, a website might accept a query and sort order in its address. Its server decides which results to return. The Reddit plugin then reads the loaded result elements and hides entries below the configured thresholds or matching an earlier result.
| Input | Runs in | Changes |
|---|---|---|
| Search URL | Website | Requested results |
| Plugin rules | bmux pane | Loaded display |
The bookmark walkthrough shows the existing URL controls. The new bookmark plugin contract adds saved page behavior alongside them.
The screenshot below shows bmux's existing URL parameter editor. Here, q and limit become part of the saved address. The page filter's score, comment, and duplicate settings belong to the separate overlay shown above.
Save behavior under the bookmark's identity
I store plugin attachments separately from URL parameters, keyed by profile and bookmark ID. Each attachment contains a plugin ID, an enabled flag, and its configured values.
Using the bookmark ID means changing its title or search URL does not require creating a new set of filter settings. The profile is part of the key because bookmarks belong to profiles.
When the bookmark opens, its pane records which profile and bookmark it came from. The runtime uses that reference to find the attachments. They survive reloads and browser restoration. Copying the window or opening a link in a new pane does not copy that reference.
This keeps the filter tied to the saved workflow. A search opened from the bookmark receives it; an unrelated page does not acquire it just because another pane used the same plugin. URL matching adds another condition before the script runs.
Give the script a small contract
A bookmark plugin declares matching URLs, a script, and controls such as numbers, booleans, text, or choices. bmux validates the configured values before using them. The script receives those values and must return a cleanup function.
The script runs in an isolated JavaScript world in the pane. It can read and change the page DOM, but it receives no Node, bmux host, or Chrome extension APIs. The website's own JavaScript runs in a different world. This is still code I have to trust: it shares the document and can change what I see.
bmux adds an overlay for enabling the attachment and editing its settings. An overlay update is checked against the current pane, document, and existing attachment. It cannot supply a different bookmark ID and update another search's configuration.
Keeping the host controls separate from the filter script gives other plugins the same settings mechanism without making each one implement its own configuration panel.
New results need observation. Old changes need cleanup.
Reddit search can append results while scrolling. Running a filter once at page load would miss those entries.
The bundled filter uses a MutationObserver to notice new elements and updated counts. It waits briefly before applying another pass. During that pass it disconnects the observer, so its own display changes do not keep triggering more passes.
Before hiding an element, it remembers the original inline display value and its priority. When the filter is disabled or replaced, cleanup disconnects the observer, clears pending work, and restores those values. Restoring an empty display value is different from setting every result to block.
I checked the bundled filter on sample result elements. Low-count entries were hidden, qualifying duplicates were removed, and cleanup restored the original display styles. These checks cover those examples; they do not establish compatibility with every version of Reddit's page layout.
Filtering is a view of the evidence
The default thresholds are two points and two comments, requiring both. Either threshold can be disabled by setting it to zero. Unknown counts stay visible rather than being treated as zero.
Duplicate handling happens after threshold filtering, so a low-count entry does not hide a later qualifying one. The first qualifying duplicate stays visible. Title matching ignores case and repeated whitespace but preserves punctuation.
Those rules make the display predictable. They do not establish that the remaining posts describe stronger demand. High engagement can have many causes, and two similar titles can still describe different experiences. Turning the filter off restores the hidden results for inspection.
The saved bookmark now retains three things: a destination, the website's search parameters, and the local behavior I want applied to its results. The server still controls retrieval. The plugin gives me a reusable way to inspect what arrived.