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.

Thanks for reading! If you're new here, I'm Sean. I spent most of my career building B2B SaaS for startups. Now I freelance, and I currently have capacity to take on one new client. If you'd like to hire me as a contractor, check out my professional experience and shoot me an email.
© 2024 Sean Gransee