Crispy
03-13-2011, 10:46 AM
Here is a Firefox bookmarklet to display attachments as all images on one page.
It makes it more convenient to view images. (or download them if you use a downloader add-on like DownloadThemAll!)
You just create any type of bookmark you want, probably in your Bookmarks Toolbar, which is just a place holder. Then copy the Javascript code below, right-click on the bookmark and choose Properties, then paste it into the Location text box, maybe change a few of the other items, like Name, then click SAVE.
Then click on that bookmarklet when you are on a forum page that has attachments and a new window or tab will be opened with all of the expanded images on it.
javascript:/*%20show%20linked%20images%20*/%20(function(){function%20II(uu,arx,irx,xrx){var%2 0tt=uu.split('.'),ee=tt[tt.length-1].toLowerCase(),rr;var%20bOK={gif:1,jpg:1,jpeg:1,pn g:1,mng:1,bmp:1}[ee];if(arx&&arx!=''){rr=new%20RegExp(arx,'gi');bOK=bOK||(uu.se arch(rr)!=-1)}if(irx&&irx!=''){rr=new%20RegExp(irx,'gi');bOK=bOK&&(uu.search(rr)!=-1)}if(xrx&&xrx!=''){rr=new%20RegExp(xrx,'gi');bOK=bOK&&(uu.search(rr)==-1)}return%20bOK}function%20hE(ss){return%20ss.repl ace(/&/g,'&').replace(/>/g,'>').replace(/</g,'<').replace(/%22/g,'%22');}var%20qq,hh,ii,zz,ww,ll,ic,act,pp,mp;if( frames.length>=2&&window.document.body.innerHTML.search(/<iframe/)==-1){if(location.href.search(/geocities/)!=-1)ww=frames[0];else%20ww=frames[1]}else%20ww=window;ll=ww.document.links.length;try{ bu=ww.location.href.match(/(^.+\/\/.+\/).*$/)[1]}catch(eErr){bu=ww.location.href;if(bu.substr(strl en(bu)-1)!=%22/%22)bu=bu+%22/%22}act=0;var%20sAregex=prompt('Add%20In%20regex:' ,'attachment');if(sAregex===null)sAregex='';var%20 sIregex=prompt('Filter%20In%20regex:','');if(sIreg ex===null)sIregex='';var%20sXregex=prompt('Filter% 20Out%20regex:','');if(sXregex===null)sXregex='';f or(ii=0;qq=ww.document.links[ii],ii<ll;++ii){hh=qq.href;if(hh&&II(hh,sAregex,sIregex,sXregex))++act}mp=false;if(a ct>100)if(confirm(act+'%20links%20--%20Multiple%20pages?%20('+Math.ceil(act/63)+')'))mp=true;var%20thedoc='<html><head><title>Show%20Linked%20Images%20-%20(*nogmlinks*)</title><base%20href=%22'+bu+'%22></head><body%20bgColor=%22#222222%22%20text=%22#fcfcfc%22% 20link=%22#6666cc%22%20vlink=%22#cc66cc%22%20alink =%22#aa0000%22%20onLoad=%22setTimeout(\'focus()\', 200)%22><p>%C2%A0</p><p>'+act+'%20image%20links%20found%20on%20'+hE(ww.loc ation.href)+':</p><div%20style=%22cursor:%20pointer;%20position:%20fi xed;%20height:%2022px;%20width:%2057px;%20top:%207 px;%20left:%20400px;%20color:%20#000;%20background-color:%20#b9dfbb;%20text-align:%20center;%20font:%20button%2014px/16px%20sans-serif;%20border:%201px%20outset%20#5bb560;%22%20on Click=%22window.close()%22>Close</div>';pp=1;ic=0;imgs='';for(ii=0;qq=ww.document.links[ii],ii<ll;++ii){if(((ic&63)==63&&!mp)?(confirm(ic+'%20links%20processed%20out%20of% 20'+act+'\r\nContinue?')):true){hh=qq.href;if(hh&&II(hh,sAregex,sIregex,sXregex)){imgs+='<p>'+qq.innerHTML+'%20(<a%20href=%22'+hE(hh)+'%22%20target=%22_blank%22>'+hE(hh)+'</a>)<br><img%20src=%22'+hE(hh)+'%22%20border=0>';++ic;if((ic&63)==63&&mp){zz=ww.open().document;zz.write(thedoc+'<p>Page%20'+pp+'</p><hr>'+imgs+'<hr><p>'+ic+'%20linked%20images%20displayed%20out%20of%20 '+act+'%20links%20from%20'+hE(ww.location.href)+'</p></body></html>');zz.close();ic=0;++pp;imgs=''}}}else{ii=ll}}if(i c!=0){zz=ww.open().document;zz.write(thedoc+'<p>Page%20'+pp+'</p><hr>'+imgs+'<hr><p>'+ic+'%20linked%20images%20displayed%20out%20of%20 '+act+'%20links%20from%20'+hE(ww.location.href)+'</p></body></html>');zz.close()}})()
That should do it.
It makes it more convenient to view images. (or download them if you use a downloader add-on like DownloadThemAll!)
You just create any type of bookmark you want, probably in your Bookmarks Toolbar, which is just a place holder. Then copy the Javascript code below, right-click on the bookmark and choose Properties, then paste it into the Location text box, maybe change a few of the other items, like Name, then click SAVE.
Then click on that bookmarklet when you are on a forum page that has attachments and a new window or tab will be opened with all of the expanded images on it.
javascript:/*%20show%20linked%20images%20*/%20(function(){function%20II(uu,arx,irx,xrx){var%2 0tt=uu.split('.'),ee=tt[tt.length-1].toLowerCase(),rr;var%20bOK={gif:1,jpg:1,jpeg:1,pn g:1,mng:1,bmp:1}[ee];if(arx&&arx!=''){rr=new%20RegExp(arx,'gi');bOK=bOK||(uu.se arch(rr)!=-1)}if(irx&&irx!=''){rr=new%20RegExp(irx,'gi');bOK=bOK&&(uu.search(rr)!=-1)}if(xrx&&xrx!=''){rr=new%20RegExp(xrx,'gi');bOK=bOK&&(uu.search(rr)==-1)}return%20bOK}function%20hE(ss){return%20ss.repl ace(/&/g,'&').replace(/>/g,'>').replace(/</g,'<').replace(/%22/g,'%22');}var%20qq,hh,ii,zz,ww,ll,ic,act,pp,mp;if( frames.length>=2&&window.document.body.innerHTML.search(/<iframe/)==-1){if(location.href.search(/geocities/)!=-1)ww=frames[0];else%20ww=frames[1]}else%20ww=window;ll=ww.document.links.length;try{ bu=ww.location.href.match(/(^.+\/\/.+\/).*$/)[1]}catch(eErr){bu=ww.location.href;if(bu.substr(strl en(bu)-1)!=%22/%22)bu=bu+%22/%22}act=0;var%20sAregex=prompt('Add%20In%20regex:' ,'attachment');if(sAregex===null)sAregex='';var%20 sIregex=prompt('Filter%20In%20regex:','');if(sIreg ex===null)sIregex='';var%20sXregex=prompt('Filter% 20Out%20regex:','');if(sXregex===null)sXregex='';f or(ii=0;qq=ww.document.links[ii],ii<ll;++ii){hh=qq.href;if(hh&&II(hh,sAregex,sIregex,sXregex))++act}mp=false;if(a ct>100)if(confirm(act+'%20links%20--%20Multiple%20pages?%20('+Math.ceil(act/63)+')'))mp=true;var%20thedoc='<html><head><title>Show%20Linked%20Images%20-%20(*nogmlinks*)</title><base%20href=%22'+bu+'%22></head><body%20bgColor=%22#222222%22%20text=%22#fcfcfc%22% 20link=%22#6666cc%22%20vlink=%22#cc66cc%22%20alink =%22#aa0000%22%20onLoad=%22setTimeout(\'focus()\', 200)%22><p>%C2%A0</p><p>'+act+'%20image%20links%20found%20on%20'+hE(ww.loc ation.href)+':</p><div%20style=%22cursor:%20pointer;%20position:%20fi xed;%20height:%2022px;%20width:%2057px;%20top:%207 px;%20left:%20400px;%20color:%20#000;%20background-color:%20#b9dfbb;%20text-align:%20center;%20font:%20button%2014px/16px%20sans-serif;%20border:%201px%20outset%20#5bb560;%22%20on Click=%22window.close()%22>Close</div>';pp=1;ic=0;imgs='';for(ii=0;qq=ww.document.links[ii],ii<ll;++ii){if(((ic&63)==63&&!mp)?(confirm(ic+'%20links%20processed%20out%20of% 20'+act+'\r\nContinue?')):true){hh=qq.href;if(hh&&II(hh,sAregex,sIregex,sXregex)){imgs+='<p>'+qq.innerHTML+'%20(<a%20href=%22'+hE(hh)+'%22%20target=%22_blank%22>'+hE(hh)+'</a>)<br><img%20src=%22'+hE(hh)+'%22%20border=0>';++ic;if((ic&63)==63&&mp){zz=ww.open().document;zz.write(thedoc+'<p>Page%20'+pp+'</p><hr>'+imgs+'<hr><p>'+ic+'%20linked%20images%20displayed%20out%20of%20 '+act+'%20links%20from%20'+hE(ww.location.href)+'</p></body></html>');zz.close();ic=0;++pp;imgs=''}}}else{ii=ll}}if(i c!=0){zz=ww.open().document;zz.write(thedoc+'<p>Page%20'+pp+'</p><hr>'+imgs+'<hr><p>'+ic+'%20linked%20images%20displayed%20out%20of%20 '+act+'%20links%20from%20'+hE(ww.location.href)+'</p></body></html>');zz.close()}})()
That should do it.