To enable finding text within any website, follow the below instructions:
- Open Safari (pretty self explanatory).
- Create a new bookmark.
- In the Title window, write whatever you want your bookmark to be named (I chose "Find on Page")
- In the address bar add the following javascript code:
javascript:void(s=prompt('Find text:',''));s='('+s+')';x=new RegExp(s,'gi');rn=Math.floor(Math.random()*100);rid='z' + rn;b = document.body.innerHTML;b=b.replace(x,'$1');void(document.body.innerHTML=b);alert('Found ' + document.getElementsByName(rid).length + ' matches.');window.scrollTo(0,document.getElementsByName(rid)[0].offsetTop);
NOTE: As with the post on viewing source code, I did not develop this javascript bookmark. All credit goes to Matthew Panzarino.
0 comments:
Post a Comment