Find on page (CMD+F on a Mac) was never something I really felt like I needed in Mobile Safari, until I bought an iPad. As the experience is more than the iPhone, it felt like it needed more of the features from a desktop version of the application. In an effort to learn more pure JavaScript I decided to create a bookmarklet to solve the problem. While I'm sure there are others out there, I created this for myself as a way to back away from relying on jQuery and teach myself some raw JS.
Features
- It reports how many results are found for your search keyword, and allows you to easily step through them.
- Text that is contained within a hidden element (display:none or visibility:hidden) are not shown; it highlights only what you're able to see.
- Native-ish look and feel for both the iPad and iPhone.
- It doesn't break the content of the page you search on, so multiple searches can be made without any issue.
Known issues
Text within different nodes cannot be highlighted together — if part of a word is bold, it is considered a different word in terms of the search.
Example: JavaScript
The word "JavaScript" above is considered three words — "Java", "Scr" and "ipt", as part of the text is within a <strong> tag. As such, it won't get highlighted in a search for "JavaScript".
Download
CMD+F is free and open source. It is available to install from the installation guide here, and you can view the source and fork it on GitHub.
Update: Before you complain about the installation process, please read this post by Marco Arment regarding the state of bookmarklets on Mobile Safari.