Quicksaver / FindBar-Tweak

A firefox add-on that lets you customize the Find Toolbar the way you like it.
https://addons.mozilla.org/firefox/addon/findbar-tweak/
Mozilla Public License 2.0
91 stars 21 forks source link

Highlight multiple words in different colors #76

Open DavidGP opened 11 years ago

DavidGP commented 11 years ago

Don't know whether this additional green bar is a Firefox feature or FindBar-related:

2013-11-12_083528

Anyway, I find it annoying and would be glad to know how to get rid of that green bar.

Thanks David.P

Quicksaver commented 11 years ago

That's not from firefox or from FBT. It must be another add-on adding that. Could you let me know which one it is after you find out? I've never seen that one.

DavidGP commented 11 years ago

OK thanks Quicksaver. I found the culprit, it was the "Highlight All" addon that highlights all occurrences of a word on the page automatically if selected.

Actually, I like that functionality very much (even better is the Highlight All Chrome extension that keeps previous highlights and allows to add more (each word in a different color, like here: http://666kb.com/i/cj6sv5oziewlmiz5c.png)

Is the Highlight All Firefox extension functionality maybe already contained in FindBar-Tweak?

Cheers David.P

Quicksaver commented 11 years ago

Mostly. Just enable the preference "Fill the findbar with the selected text". If "Highlight all by default" is enabled and "Remove highlights when the findbar is closed" is disabled, it will highlight the selected phrase even if the findbar is closed.

There is a difference between FBT and the Highlight All add-on though, right now, if you click somewhere on the page to unselect some word, it won't remove the highlights, but I plan to change that for the next release.

As for highlighting multiple words, the future regex feature I'm currently working on will let you do that from the findbar. For example, if you type "this|that" it will highlight both "this" and "that". But I never considered doing the same with selecting text directly on the page...

I'm going to see what I can do about adding multiple selections support like that, and about adding multiple colors as well.

Just out of curiosity, does that chrome add-on let you choose the various highlight colors, or are they predefined/automatic?

DavidGP commented 11 years ago

Just enable the preference "Fill the findbar with the selected text". If "Highlight all by default" is enabled and "Remove highlights when the findbar is closed" is disabled, it will highlight the selected phrase even if the findbar is closed

Great, that worked!

The colors with the chrome add-on are random as far as I can see.

Another approach (automatic keyword extraction and highlighting) is described here: http://www.donationcoder.com/forum/index.php?topic=24496.msg231311#msg231311

This also supports manual adding of keywords (which then are highlighted in a new color).

Personally, I much prefer adding highlights by simply selecting the text. Highlighting words from a toolbar i my view is already perfectly solved with the SearchWP Firefox extension.

Cheers David.P

DavidGP commented 10 years ago

Hi Quicksaver,

thanks for your continued work.

One additional question related to the "Highlight all" functionality: It would be great if this functionality could be disabled inside text areas since it tends to interfere with text editing, especially in rich text editors like in some forums.

Keep up the great work Regards David.P

Quicksaver commented 10 years ago

That'll be easy to implement. ;)

Quicksaver commented 10 years ago

But I should ask, what do you mean it interferes with text editing? The highlight on a word should disappear as soon as you edit that word somehow, and if not they should remain (only the highlights grid won't be kept updated as you edit the text, it will remain static from the first time you ran the search until you run another search).

DavidGP commented 10 years ago

But I should ask, what do you mean it interferes with text editing?

It can make it hard to select words, and sometimes even interferes with the selection (word gets highlighted but not selected). At least it makes it hard to see what is a highlight, and what is a selection (that you can work on).

Some forums' rich text editors even take the highlights as granted and include them in the posting!

Quicksaver commented 10 years ago

(I'm sorry for posting this here, but I have no other way to contact you.) David, could you please read the reply I wrote to your latest review in FBT? I get the feeling from the way you phrased it that you never read my previous replies, and if so you're probably not receiving the reply notifications from AMO and you should either enable them there in the account preferences or check your spam folder.

DavidGP commented 10 years ago

Whooa sorry about that