searchmarkers / mark-my-search

Search keyword highlighter for Firefox and Chromium
https://markmysearch.ator.systems
MIT License
41 stars 3 forks source link

HIGHLIGHT engine and major restructure #152

Closed ator-dev closed 3 weeks ago

ator-dev commented 5 months ago

The Custom Highlight API, now available in Chromium-based browsers and under development in Firefox (bugzilla) has made it possible to highlight webpages without changing their structure (or even, their attributes).

This new first-class support for the highlighting paradigm warrants a new highlighting engine to take full advantage of it in supported browsers. It creates potential for any modern "search highlighter" browser extension to operate with high efficiency, high accuracy, and low-to-none website experience impact - all of this with an API which is much easier for developers to work with, enabling more maintainability and less technical debt.

I have taken the opportunity to fully restructure my codebase! The new Mark My Search, making use of small, independent ES modules and classes, will be highly maintainable and should be easier to learn from.

I am aiming for full feature parity with my other highlighting engines before merging this PR. My other aims before the release of v1.15 v2 include unit tests for the highlighting engines, the ability to choose any highlighting engine, and improvements to how messages are handled internally.

Fix #144

ator-dev commented 3 weeks ago

This PR has turned into a monster that changes far more than any single PR should. The largest and most obvious change - that is, the restructuring and modularisation of nearly the entire codebase - isn't even much related to the original intent; although modularisation certainly made the development of the HIGHLIGHT engine more interesting. Moving forwards, Mark My Search's codebase should be far more flexible and fun to work with.

The latest commit on this branch brings HIGHLIGHT to feature parity with the other engines. It should require relatively little work to make it release-worthy. Hence I am merging this PR here.