The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Javascript Open Directory Image Viewer

1 reply on 1 page. Most recent reply: Feb 13, 2004 4:17 AM by David Cumps

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
David Cumps

Posts: 319
Nickname: cumpsd
Registered: Feb, 2004

David Cumps is a Belgian Student learning .NET
Javascript Open Directory Image Viewer Posted: Feb 13, 2004 4:17 AM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by David Cumps.
Original Post: Javascript Open Directory Image Viewer
Feed Title: David Cumps
Feed URL: http://weblogs.asp.net/cumpsd/rss?containerid=12
Feed Description: A Student .Net Blog :p
Latest .NET Buzz Posts
Latest .NET Buzz Posts by David Cumps
Latest Posts From David Cumps

Advertisement
You all know those open directories with pictures in it.

And you all know how annoying it can be to view them all by clicking them, or downloading them all to your hd and viewing them there.

Well, here's another way:

Add this .url to your favorites. And when you're on such an open dir, just hit the url and it will show all the .jpg, .gif, .png and .bmp's on that page.

All this actually is, is a javascript as url. This has been tested in IE6, I don't garantee it'll work in other browsers, you can try.

Here's the actual script that's in the link:

var sHTML = '<html><head><title>Fotoviewer</title></head>\n<body>\n\t<div%20align="center">\n';

for (x = 0; x < document.links.length; x++) {

       link = document.links(x).href;

       if ((link.indexOf('.jpg') != -1) || (link.indexOf('.gif') != -1) || (link.indexOf('.png') != -1) || (link.indexOf('.bmp') != -1)) {

              sHTML += '\t\t<img%20src="'+document.links(x).href+'"/><br/><br/>\n'

       }

}

sHTML += "\t</div>\n</body></html>";

document.body.innerHTML=sHTML;


Or in a compact one line version:

javascript:var%20sHTML='<html><head><title>Fotoviewer</title></head>\n<body>\n\t<div%20align="center">\n';for(x=0;x<document.links.length;x++){link=document.links(x).href;if((link.indexOf('.jpg')!=-1)||(link.indexOf('.gif')!=-1)||(link.indexOf('.png')!=-1)||(link.indexOf('.bmp')!=-1)){sHTML+='\t\t<img%20src="'+document.links(x).href+'"/><br/><br/>\n'}}sHTML+="\t</div>\n</body></html>";document.body.innerHTML=sHTML;

Read: Javascript Open Directory Image Viewer


Johan

Posts: 1
Nickname: xayomoe
Registered: Jun, 2004

Re: Javascript Open Directory Image Viewer Posted: Jun 11, 2004 12:17 AM
Reply to this message Reply
Maybe you can use an app instead.
I use this app, Opendir Viewer
You can find it on some download sites and on the developers page, www.niceapps.com

Flat View: This topic has 1 reply on 1 page
Topic: UEFA EURO 2004 in Portugal starts on Saturday! Previous Topic   Next Topic Topic: Won at the DigiKids 2004 Awards!

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use