When you are browsing on your iPhone have you come across the need to be able to search for a word on the website ? Traditionally this is not possible , but there is a hack to get this up and running on any iPhone and unlike the many other hacks this does NOT require you to Jailbreak your device.
Copy the following code on your iPhone, you can open the page in mobile Safari and copy it or copy and paste the following text into an e-mail and send it to yourself.
javascript:void%28s%3Dprompt%28%27Find%20text%3A%27%2C%27%27%29%29%3Bs%3D%27%28%27+s+%27%29%27%3Bx%3Dnew%20RegExp%28s%2C%27gi%27%29%3Brn%3DMath.floor%28Math.random%28%29*100%29%3Brid%3D%27z%27%20+%20rn%3Bb%20%3D%20document.body.innerHTML%3Bb%3Db.replace%28x%2C%27%3Cspan%20name%3D%27%20+%20rid%20+%20%27%20id%3D%27%20+%20rid%20+%20%27%20style%3D%5C%27color%3A%23000%3Bbackground-color%3Ayellow%3B%20font-weight%3Abold%3B%5C%27%3E%241%3C/span%3E%27%29%3Bvoid%28document.body.innerHTML%3Db%29%3Balert%28%27Found%20%27%20+%20document.getElementsByName%28rid%29.length%20+%20%27%20matches.%27%29%3Bwindow.scrollTo%280%2Cdocument.getElementsByName%28rid%29%5B0%5D.offsetTop%29%3B
If you cant see the code above, download this text file : SearchOnPage
Now open up Safari on your iPhone and go to any web site. Bookmark the website to your Safari bookmarks. After that, edit the bookmark you just bookmarked and erase title of the bookmark and name it “SearchOnPage” or whatever you want. Save it. Open the Bookmark and click on Edit and select SearchOnPage. Erase the entire http://www.whatever address line and double tap in the blank space and then tap on “Paste”. Click on Done.
To test it out, go to any website and then tap the bookmarks icon and select “SearchOnPage”. You will get a Popup. Type what ever you want to search in there. And then the app will tell you how many times the word has appeared on the webpage and then it will highlight the keyword in a yellow background. You should now be able to find text in whatever web site you’re currently on. Credits to the original author Rafael Cimatti for coming up with this great hack.
0 comments:
Post a Comment