turn bookmarklet into greasemonkey script

Discussion in 'Javascript' started by Raistlin Majere, May 6, 2007.

  1. 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; }})();
     
    Raistlin Majere, May 6, 2007
    #1
    1. Advertising

  2. Raistlin Majere

    -Lost Guest

    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.
     
    -Lost, May 6, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lachie
    Replies:
    1
    Views:
    104
    Adam Keys
    Mar 24, 2006
  2. kurt
    Replies:
    1
    Views:
    80
    Robert
    Sep 22, 2004
  3. Newton
    Replies:
    2
    Views:
    342
    Lasse Reichstein Nielsen
    Sep 21, 2005
  4. Replies:
    2
    Views:
    110
    Csaba Gabor
    May 1, 2006
  5. MKR
    Replies:
    1
    Views:
    126
    Martin Honnen
    Mar 1, 2007
Loading...

Share This Page