[Request] Help with turning directory listing into photo gallery

I used to have an addon which would turn any web page list into a photo gallery. That was disabled so I started using a java applet to do the same job.

I recently had to refresh my browser and I lost the java applet I had bookmarked. I can not find the applet again. Could one of you fine people point me in the correct direction of a firefox addon or java applet which does the same thing please.

Posted Jul 14, 2019, 10:08 PM UTC

165
KoalaBear84•

I'm using this one:

javascript:var imagesHtml='';for(x=0;x<document.links.length;x++){a=document.links[x].href;if (a.match(/jpe|jpeg|jpg|bmp|tiff|tif|bmp|gif|png|mov|mkv|3gp/i)){imagesHtml+='<a target="_new" href="'+a+'"><div class="imageContainer"><img class="image" src="'+a+'"></div></a>';}};document.getElementsByTagName('body')[0].innerHTML='<html><head><title>Gallery</title><body><style>*{margin:0;padding:0;}.imageContainer{position:relative;display:inline-block;width:200px;height:200px;margin:5px;}.image{position:absolute;position:absolute;top:50%;left:50%;margin-right:-50%;transform:translate(-50%,-50%);border:0;max-height:200px;max-width:200px;border-radius:5px;}</style><center><div>'+imagesHtml+"</div></center></body></html>";
3
madonnac•

This is the bookmarklet I use:

javascript:var%20sHTML="<html><head><title>gallery</title><body><center><table%20border=0>";var%20y=0;for(x=0;x<document.links.length;x++){a=document.links[x].href;%20if%20(a.match(/jpe|jpeg|jpg|bmp|tiff|tif|bmp|gif|png/i)){sHTML+='<td%20style="border-style:solid;border-width:1px"><a%20target="_new"%20href="'+a+'"><img%20border="0"%20width="600"%20src="'+a+'"></a></td>';%20if%20(!((x+1)%2))%20sHTML+="</tr><tr>"}};this.innerHTML=sHTML+"</table></center></body></html>";

create a new shortcut (can be anything, as you will edit it).
go to the properties of the shortcut, and paste that code in as the address.

2
ringofyre•

Display pictures as thumbnails :

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

https://www.reddit.com/r/opendirectories/comments/933pzm/all_resources_i_know_related_to_open_directories/

2
denhalOP•

Thank you all for the replies.

2