Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'More extensible version' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
More extensible version
Authored by: trekan on Oct 24, '03 08:51:36PM
This is even more extensible:

<html>
<body>
<script language="JavaScript">
	var url = new Array();
	var counter = 0
		url[counter++] = "http://www.apple.com/macosx/features/finder/";
         url[counter++] = "http://www.apple.com/macosx/features/expose/";
         url[counter++] = "http://www.apple.com/ichat/";
         url[counter++] = "http://www.apple.com/macosx/features/filevault/";
         url[counter++] = "http://www.apple.com/macosx/features/fastuserswitching/";
         url[counter++] = "http://www.apple.com/macosx/features/mail/";
         url[counter++] = "http://www.apple.com/macosx/features/idisk/";
         url[counter++] = "http://www.apple.com/macosx/features/preview/";
         url[counter++] = "http://www.apple.com/macosx/features/fontbook/";
         url[counter++] = "http://www.apple.com/macosx/features/unix/";
         url[counter++] = "http://www.apple.com/macosx/features/xcode/";
         url[counter++] = "http://www.apple.com/macosx/features/addressbook/";
         url[counter++] = "http://www.apple.com/macosx/features/aqua/";
         url[counter++] = "http://www.apple.com/macosx/features/audio/";
         url[counter++] = "http://www.apple.com/macosx/features/colorsync/";
         url[counter++] = "http://www.apple.com/macosx/features/darwin/";
         url[counter++] = "http://www.apple.com/macosx/features/dvdplayer/";
         url[counter++] = "http://www.apple.com/macosx/features/faxing/";
         url[counter++] = "http://www.apple.com/macosx/features/fonts/";
         url[counter++] = "http://www.apple.com/macosx/features/graphicsandmedia/";
         url[counter++] = "http://www.apple.com/macosx/features/imagecapture/";
         url[counter++] = "http://www.apple.com/macosx/features/inkwell/";
         url[counter++] = "http://www.apple.com/macosx/features/international/";
         url[counter++] = "http://www.apple.com/macosx/features/internet";
         url[counter++] = "http://www.apple.com/macosx/features/java/";
         url[counter++] = "http://www.apple.com/macosx/features/mobility/";
         url[counter++] = "http://www.apple.com/macosx/features/networking/";
         url[counter++] = "http://www.apple.com/macosx/features/printing/";
         url[counter++] = "http://www.apple.com/macosx/features/quartzextreme/";
         url[counter++] = "http://www.apple.com/macosx/features/rendezvous/";
         url[counter++] = "http://www.apple.com/macosx/features/speech/";
         url[counter++] = "http://www.apple.com/macosx/features/universalaccess/";
         url[counter++] = "http://www.apple.com/macosx/features/x11/";
         url[counter++] = "http://www.apple.com/macosx/features/windows/";
         url[counter++] = "http://www.apple.com/macosx/features/systempreferences/";
         url[counter++] = "http://www.apple.com/macosx/features/security/";
	var number = (Math.floor(Math.random() * counter));
	window.location.replace(url[number]);
</script>
</html>


[ Reply to This | # ]
More extensible version
Authored by: rammjet on Oct 25, '03 01:41:40AM

Or make a bookmark out of it and put it on the bookmark bar. Everytime you click it, you get a random page:

- grab everything AFTER the "<script language="JavaScript">" and BEFORE the "</script> tags and paste it into your favorite text editor

- edit the text to add a semicolon to the end of the "var counter = 0" (ie. var counter = 0;)

- remove all spaces to create one long jumble of javascript code

- insert "javascript:" at the beginning

- the code will start like this: "javascript:var url = new Array();var counter = 0;url[counter++] ..."
and end like this: "... var number = (Math.floor(Math.random() * counter)); window.location.replace(url[number]);"

- finally, make a bookmark: paste the code you created above into the top URL field of Safari, then drag that to the bookmark bar, and give it a name when it asks.



[ Reply to This | # ]
Here's a Bookmarklet
Authored by: dzurn on Oct 27, '03 06:47:36PM
Drag this link named random to your Safari bookmarks bar!

I shortened the script and added a couple more links.

Darryl

---
Madness takes its toll.
Please have exact change.

[ Reply to This | # ]

Here's a Bookmarklet
Authored by: dzurn on Oct 27, '03 07:00:50PM

...which is how I found out that I can only paste 1000 or so characters as an HTML link in the comment box before the link doesn't work! So even though the link was valid, an excessive number of characters caused Geeklog to not render it as a link.

So I trimmed the Javascript down, even though I was able to add a couple of more links to it, by a little substitution :)

Darryl

---
Madness takes its toll.
Please have exact change.



[ Reply to This | # ]