Unlinker for Safari 4 and later!

Discussion in 'OT Technology' started by DRAIGON, Jul 28, 2009.

  1. DRAIGON

    DRAIGON New Member

    Joined:
    Dec 7, 2007
    Messages:
    743
    Likes Received:
    0
    Location:
    Texas
    Not sure if this has been posted. I found on another site.


    Just bookmark any page you want. Edit address and replace with this code:

    javascript:(function() {var _document = document; var regEx = new RegExp('\.gif|jpeg|jpg|png|bmp$', 'i');var links = _document.getElementsByTagName('a'); for (var i = 0; i < links.length; i++) {if (regEx.test(links.item(i).href)) {var parent = links.item(i).parentNode;if (parent == null)parent = _document.body;var tImg = _document.createElement('IMG');var br = _document.createElement('BR');tImg.src = links.item(i).href;parent.insertBefore(tImg,links.item(i));parent.insertBefore(br,links.item(i));}} })();


    Thats it. Now just click that bookmark and it will unlink your photos.
     
  2. DRAIGON

    DRAIGON New Member

    Joined:
    Dec 7, 2007
    Messages:
    743
    Likes Received:
    0
    Location:
    Texas
    the smilie is not suppose to be there. BB code is strong itt. It is : ( without the space.
     
  3. Pitt

    Pitt 1-1-11 — Never Forget OT Supporter

    Joined:
    Jul 1, 2003
    Messages:
    150,314
    Likes Received:
    0
    Location:
    Injured Reserve
    javascript:(function()%7Bfunction%20I(u)%7Bvar%20t=u.split('.'),e=t%5Bt.length-1%5D.toLowerCase();return%20%7Bgif:1,jpg:1,jpeg:1,png:1,mng:1%7D%5Be%5D%7Dfunction%20hE(s)%7Breturn%20s.replace(/&/g,'&').replace(/%3E/g,'%3E').replace(/%3C/g,'%3C').replace(/%22/g,'%22');%7Dvar%20q,h,i,z=open().document;z.write('%3Cp%3EImages%20linked%20to%20by%20'+hE(location.href)+':%3C/p%3E%3Chr%3E');for(i=0;q=document.links%5Bi%5D;++i)%7Bh=q.href;if(h&&I(h))z.write('%3Cp%3E'+q.innerHTML+'%20('+hE(h)+')%3Cbr%3E%3Cimg%20src=%22'+hE(h)+'%22%3E');%7Dz.close();%7D)()

    to open all linked pics in a new window
     
  4. hsmith

    hsmith OT Supporter

    Joined:
    Feb 24, 2002
    Messages:
    124,533
    Likes Received:
    596
    Location:
    Your mother.
    thanks for posting my code lolz
     
  5. omgwtfbbqryan

    omgwtfbbqryan OT Supporter

    Joined:
    Aug 22, 2003
    Messages:
    14,590
    Likes Received:
    0
    Location:
    CA
    :cool:
     

Share This Page