Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Override browser "Find" feature

I'm wondering whether it's possible to use JavaScript to intercept or prevent the user from using the browser's "Find" feature to find text on the page. (Trust me, I have a good reason!) I'm guessing the answer is "no," beyond the obvious intercepting Cmd/Ctrl+F.

A second-best solution would be to intercept the text highlighting that the browser performs during a Find. Is there any way to do this, in any browser?

like image 663
Trevor Burnham Avatar asked May 03 '10 19:05

Trevor Burnham


1 Answers

Not without the help of a browser-specific extension I think, if at all. This is a process that is entirely outside the JavaScript context.

like image 77
Pekka Avatar answered Sep 27 '22 18:09

Pekka