Disable CTRL+F for Certain HTML Elements or Whole Page


I plan on creating a web-based game where using CTRL+F to search for text on a page would be cheating. To stop this from happening, I created a jQuery plugin that stops certain HTML elements from being searched.

View the source code to use it in your own project, and check out the demo to see it in action.

How to use:

Include jQuery and disableFind.js.

Call the disableFind() function on the element(s) you want to make unsearchable.

© 2024 Sean Gransee