searchmarkers / mark-my-search

Search keyword highlighter for Firefox and Chromium
https://markmysearch.ator.systems
European Union Public License 1.2
43 stars 3 forks source link

[Feature Request] Add new search candidate to current highlight one? #133

Open tmpm697 opened 1 year ago

tmpm697 commented 1 year ago

Steps:

1. go to a website
2. select a word and right click, then select "Highlight Selection" to highlight it
3. select another word to highlight same as 2.
4. observe the current highlight from 2. will be removed and mark-my-search will reset its current hightlight (remove all current highlight if has) then mark-my-search displays only highlight from 3.

expect here is that both highlight from 2. and 3. still exist in mark-my-search bar and highlighted.

ator-dev commented 1 year ago

I agree, the current system is inconvenient. Currently we have two ways of taking keywords from the user selection:

As you can see, they do the same thing. Perhaps it would make more sense for Highlight Selection to behave differently, as you suggest, and for Alt+M to be the way of replacing keywords entirely.

If the user does not know about Alt+M however, this would make it difficult to replace keywords. Maybe the search-keywords-replace button could be made to show up on other pages too, except offering to delete all keywords?

image

When instead of deleting it would be replacing with search keywords (like here), the button could indicate this with a ...

tmpm697 commented 1 year ago

We can have two options in right mouse context menu:

1. Highlight Selection
2. Reset & Highlight Selection
  1. Will just append/add/plus the candidate to current marks array.
  2. Reset the marks array then add the candidate.
ator-dev commented 1 year ago

I know what you mean, but I'm not keen on adding an extra item to the context menu. Unfortunately, if you have more than one item they get pushed into a sub-menu, so every time you wanted to use one you'd have to:

right click > Mark My Search > Highlight Selection

This would also prevent being able to press H after right-clicking as a shortcut.

Maybe we could have two settings? One option to enable Highlight Selection, another to enable Highlight Only Selection.

tmpm697 commented 1 year ago

Maybe we could have two settings? One option to enable Highlight Selection, another to enable Highlight Only Selection.

yes, that's sound good, same convenience, require user to press keys to enable the function could kill the purpose, and user's preference can be different.