InfoWeek Podcast Launcher

By DesertFox Last update Jan 19, 2006 — Installed 369 times.
// ==UserScript==
// @name          InfoWeek Podcast Launcher
// @namespace     http://studio17.wordpress.com/
// @description   Opens InformationWeek's podcast for the current day.
// @include       *
// ==/UserScript==

function podcast_launch() {

var thedate = new Date( );
var theyear = thedate.getYear( );
var themonth = thedate.getMonth( ) + 1;
var theday = thedate.getDate( );

theyear = theyear.toString().substring(2,4);
if (theyear.length==1) theyear="0"+theyear;
themonth = themonth.toString();
if (themonth.length==1) themonth="0"+themonth;

location.href = 'http://i.cmpnet.com/informationweek/blog/podcasts/IWK_Daily_'+theyear+themonth+theday+'.mp3';

}

document.addEventListener("keydown", function(event) {					
	if (event.altKey && !event.ctrlKey && event.shiftKey && event.keyCode==67) podcast_launch();
}, false);