Is there a way to use Javascript or jQuery to launch Chrome Find? (Same as ctrl + f)?

I am working on an extension and instead of creating my own search functions, I would rather use Chrome to search for a page for text. Is there a way to create a button that says β€œSearch”, and when pressed will be the same as pressing the CTRL + F key by the user?

I apologize if this is an unnecessary question. I could not find it here already.

+7
source share
2 answers

https://developer.mozilla.org/en/DOM/window.find

Testing test <form onsubmit="window.find(this.q.value,false,true,true,true,false,true); return false"> <input id="q" type="text" value="test" /> <input type="submit" value="Find" /> </form> Testing test 

Note. I could only do this in order to find it (or after it was set to search back) the input field for some reason

Update: if google fast and it showed: https://github.com/philc/vimium/wiki/Chromium-bugs-we%27re-tracking

+2
source

All Articles