Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

javascript help

Name: Anonymous 2007-02-10 16:14

This is my /b/, /s/ and /gif/ bookmarklet. The recent changes to 4chan's bits made a bunch of annoying broken images to appear when I use it now. I'm a javascript n00b, so please help me fix it:

javascript:(function(){function I(u){var t=u.split('.'), e=t[t.length-1].toLowerCase();return {gif:1,jpg:1,jpeg:1,png:1,mng:1}[e]}function hE(s){return s.replace(/&/g,'&amp;').replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/%22/g,'&quot;');}function notcontains(arr, url ){var i;for( i=0; i<arr.length; i++ ){if( arr[i] == url )return 0;}return 1;}var q,h,i,z=open().document;var a = new Array();z.write('<p>Images linked to by '+hE(location.href)+':</p><hr>');for (i=0; q=document.links[i]; ++i){h=q.href;if(h&&I(h)&&notcontains(a,h)){z.write('<p><img src='+hE(h)+'>');a.push(h);}}z.close();})()

Name: Anonymous 2007-02-10 16:34

javascript:function esc(d){return (''+d).replace( /\x26/g, '&' ).replace( /\x22/g, '"' ).replace( /\x27/g, ''' ).replace( /\x3C/g, '<' ).replace( /\x3E/g, '>' ).replace( /\x5C/g, '\' );}var a = document.getElementsByTagName( 'a' ), o = open().document;o.write('<h1>Images linked to on '+esc(location.href)+'</h1>');for( var i = 0; i < a.length; i++ ){if ( a[ i ].href.match(/src\/[0-9]+\.[a-z]+$/) ){ o.write( '<p><img src="' + esc(a[ i ].href) + '" alt="" /></p>' ); }}o.close();void(0);

Name: Anonymous 2007-02-10 16:36

http://pastebin.ca/349524 <- that's better

Name: Anonymous 2007-02-10 17:14

Worked like a charm. Thanks guys.

Name: Anonymous 2009-01-14 13:50

WHBT

Name: Trollbot9000 2009-07-01 7:53

why does the world need another pastebin.

Name: Anonymous 2009-07-12 6:55

>>2
very "robe". really are and no Lololol aware? evidence human right act you out piss other identities using fed Namefag), : : :/: {/ // :.:.|_ヽ__:

Name: Sgt.Kabu뚙ᣙkiman㫓䘏 2012-05-28 22:35

Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy

Name: Anonymous 2013-04-04 21:07

hopelessly addicted to dubs

Name: Anonymous 2013-04-04 21:24

>>11
SWELL DUBS, BUT CHECK THIS 12

Don't change these.
Name: Email:
Entire Thread Thread List