View Single Post
Old 08-10-2005, 07:57 PM   #8
lescarleton
Junior Member
lescarleton began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Mar 2004
Device: Clie NX90/Psion/A920
Smile Working now

Thanks Laurens!

I've made one more change to the code to make is exclude links to indexes instead of stories. What I have is this and it seems to work!

document.name += " " + formatDate(wednesday, "yyyy-MM-dd");

var storyPattern = /0,\d+,\d+,00\.html/;

document.onanchorlink = function(link) {
var matches = link.uri.match(storyPattern);
if ((matches != null) && (link.uri.match(/story/)) ) {
var story = matches[0];
story = story.replace(",10801,", ",4814,");
link.referrer = link.uri;
link.uri = "http://www.computerworld.com/printthis/2005/" + story;
}
};

Cheers!

...Les...
lescarleton is offline