Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to disable Ctrl + F of find in page?

I have a puzzle site and its an awful way of cheating. Its okay if only partially, but can it be done?
Something I had in mind was replacing the letters with images, but anything easier than that?

like image 680
Gabor Magyar Avatar asked Aug 17 '11 10:08

Gabor Magyar


People also ask

How do I turn off Ctrl F?

Just use the ESC (escape) key, in general that's the type of thing it's intended for. :) It cancels out and closes the find box for me (in Chrome 39 on Windows).

How do I search a page without Ctrl F?

In both Chrome and Firefox, just pressing Enter (and Shift-Enter) does exactly the same thing while you're in the search box. However, this one does have a few limitations: In Firefox, when searching with / (NOT when using Control-F), this will follow a link if the text found was in a link.

Can Ctrl F be tracked?

Nope, not possible. On some browsers you can catch the key combination Ctrl + F , but you can't spy on what the user searched for. On other browsers you can't catch Ctrl + F at all. If it's any consolation, there's probably a security flaw you can use on IE6.


1 Answers

Code

window.addEventListener("keydown",function (e) {     if (e.keyCode === 114 || (e.ctrlKey && e.keyCode === 70)) {          e.preventDefault();     } }) 
like image 151
wukong Avatar answered Sep 23 '22 17:09

wukong