Can a Firefox extension intercept or alter how "find in page" works? (I know I can call find.find() from an extension, but that would mean I have to remember to use my extension instead of Find in Page and I never will remember to.) Fiddling with browser functions used to be possible, but that's before XUL went away and extensions changed to the Chrome "in-page JS with benefits" model

I have discovered that there's a @FirefoxDevTools about:config preference "findbar.modalHighlight" (thanks reddit.com/r/firefox/comments/), but afaict it doesn't seem to do anything, so that's not helpful. (What I'm looking to do is to make the Firefox find-in-page highlighted results much, much more obvious than they currently are; half the time I can't find the result, especially on a busy page or if the text is in-page but hidden.)

@FirefoxDevTools searchfox.org/mozilla-central/ and related bits in the Firefox source code seem to actually do this highlighting work, but afaict fiddling with this stuff is not available to extensions? And "recompile all of Mozilla to fiddle with this stuff to get a patch in" is beyond me, I think.

@sil @FirefoxDevTools wonder if it applies some CSS class, so you just need a custom style sheet?

@falken @FirefoxDevTools find in page's highlights don't seem to be available in the DOM, unless I'm missing something, so that doesn't work I'm afraid!

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.