Add features to Safari: Find in Page, Copy Text from Website, Open in New Tab

wildonrio

New Member
Gold
Jul 4, 2007
2,002
6
0
Provo, UT
#1
If you haven't done bookmarklets yet in Safari, I strongly suggest it! You finally can search for text in a page, copy text from a page, and even open each page in a new tab. Just go to these websites and follow the directions there:


If you are already jailbroken and want a quicker way, try this:

1. Download either hClipboard or Clippy from Cydia so you get copy and paste features on the iPhone.
2. Make three bookmarks from any websites, it doesn't matter.
3. Edit each one of these bookmarks with a new name and a new URL as shown below. To be able to copy this data, I would copy and paste this post from your computer, email it to yourself, check the email on your phone, choose "forward" so you can get editable text, copy the URLs using hClipboard or Clippy, and then paste the URLs as the new URLs for your bookmarks:

Name: Copy Text from Webpage
URL: 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

Name: Find in Page
URL: javascript:d=document;l='length';N='tagName';L='toLowerCase';P='parentNode';r='replaceChild';S='stopPropagation';function%20y(e)%7Bthis%5BP%5D%5Br%5D(this.hh,this);e%5BS%5D();%7Dfunction%20x(e)%7Bs=e.target;if(s%5BN%5D%5BL%5D()in%7Btextarea:0,input:0,select:0%7D)return;if(s!=this&&(s.href%7C%7Cs.onclick%7C%7Cs.onfocus))return;a=d.createElement('textarea');a.value=this.textContent;a.style.width=this.clientWidth+'px';a.style.height=this.clientHeight+'px';a.hh=this;a.onblur=y;this%5BP%5D%5Br%5D(a,this);a.focus();e%5BS%5D();%7Dc=d.getElementsByTagName('*');for(i=c%5Bl%5D-1;i%3E=0;--i)if(c%5Bi%5D%5BN%5D%5BL%5D()in%7Bp:0,blockquote:0,h1:0,h2:0,h3:0,h4:0,h5:0,h6:0,dt:0,dd:0,li:0,th:0,td:0,caption:0,div:0,pre:0,address:0%7D)c%5Bi%5D.addEventListener('click',x,false);/

Name: Open in New Tab
URL: javascript:d=document;l='length';N='tagName';L='toLowerCase';P='parentNode';r='replaceChild';S='stopPropagation';function%20y(e)%7Bthis%5BP%5D%5Br%5D(this.hh,this);e%5BS%5D();%7Dfunction%20x(e)%7Bs=e.target;if(s%5BN%5D%5BL%5D()in%7Btextarea:0,input:0,select:0%7D)return;if(s!=this&&(s.href%7C%7Cs.onclick%7C%7Cs.onfocus))return;a=d.createElement('textarea');a.value=this.textContent;a.style.width=this.clientWidth+'px';a.style.height=this.clientHeight+'px';a.hh=this;a.onblur=y;this%5BP%5D%5Br%5D(a,this);a.focus();e%5BS%5D();%7Dc=d.getElementsByTagName('*');for(i=c%5Bl%5D-1;i%3E=0;--i)if(c%5Bi%5D%5BN%5D%5BL%5D()in%7Bp:0,blockquote:0,h1:0,h2:0,h3:0,h4:0,h5:0,h6:0,dt:0,dd:0,li:0,th:0,td:0,caption:0,div:0,pre:0,address:0%7D)c%5Bi%5D.addEventListener('click',x,false);/
 
Last edited by a moderator:

PartisanEntity

New Member
Bronze
Oct 1, 2008
86
0
0
Austria
www.cognitivecombine.com
#2
Isn't it a shame how we have a powerful tool on our hands, but due to Apples approach we have to do obscure things to get basic features?

I can't wait to put Linux on the iPhone
 

wildonrio

New Member
Gold
Jul 4, 2007
2,002
6
0
Provo, UT
#3
Yeah it really is a shame. It's almost as if they are trying to make a point, like "We are Apple, our products are so attractive that we can even leave out really important basic features and millions will still buy it." And we are proving that point.