471,872 Members | 1,444 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,872 software developers and data experts.

turn bookmarklet into greasemonkey script

javascript:(function(){var k,x,t,i,j,p; for(k=0;x=document.links[k];k+
+){t=x.href.replace(/[%]3A/ig,':').replace(/[%]2f/
ig,'/');i=t.lastIndexOf('http');if(i>0){ t=t.substring(i);
j=t.indexOf('&'); if(j>0)t=t.substring(0,j); p=/https?\:\/\/[^
\s]*[^.,;'%22>\s\)\]]/.exec(unescape(t)); if(p) x.href=p[0]; } else if
(x.onmouseover&&x.onmouseout){x.onmouseover(); if (window.status &&
window.status.indexOf('://')!=-1)x.href=window.status;
x.onmouseout(); } x.onmouseover=null; x.onmouseout=null; }})();

May 6 '07 #1
1 1419
Raistlin Majere wrote:
javascript:(function(){var k,x,t,i,j,p; for(k=0;x=document.links[k];k+
+){t=x.href.replace(/[%]3A/ig,':').replace(/[%]2f/
ig,'/');i=t.lastIndexOf('http');if(i>0){ t=t.substring(i);
j=t.indexOf('&'); if(j>0)t=t.substring(0,j); p=/https?\:\/\/[^
\s]*[^.,;'%22>\s\)\]]/.exec(unescape(t)); if(p) x.href=p[0]; } else if
(x.onmouseover&&x.onmouseout){x.onmouseover(); if (window.status &&
window.status.indexOf('://')!=-1)x.href=window.status;
x.onmouseout(); } x.onmouseover=null; x.onmouseout=null; }})();
Is there a question hidden in your regular expression?

--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.
May 6 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Newton | last post: by
1 post views Thread by james.kingston | last post: by
25 posts views Thread by bweaverusenet | last post: by
7 posts views Thread by Amir Michail | last post: by
reply views Thread by YellowAndGreen | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.