User:EdgeNavidad/vector.js

/*** BEGIN WIKIBREAK ENFORCER ***/ $(function {	/*** Start editing here ***/	// When you want to end your break?	// no leading zeroes. (example: 7 - correct, 07 - incorrect)	var starttime = { hours: 19, minutes: 0, seconds: 0 };       var endtime = { hours: 18, minutes: 0, seconds: 0};	var currentDate = new Date;        var year=1900+currentDate.getYear;        var month=currentDate.getMonth;        var day=currentDate.getDate;	/*** Stop editing here ***/	var enforcedBreakStart = new Date( year,month,day,starttime.hours,starttime.minutes,starttime.seconds);	var enforcedBreakEnd = new Date( year,month,day,endtime.hours,endtime.minutes,endtime.seconds);       /*** Currently the code should log me out if is run between 19:00:00 and 18:00:00, local time ***/	if ((currentDate > enforcedBreakStart)&&(currentDate <= enforcedBreakEnd)&&(currentDate.getDay<7)&&(currentDate.getDay>-1)) {		alert("Enforced wikibreak until "+enforcedBreakEnd.toLocaleString + "\n(now is "+currentDate.toLocaleString+")\n\nBye!");		location = "http://"+location.host+"/w/index.php?title="			+ "Special:Userlogout&returnto=Main_Page";	} /*** END WIKIBREAK ENFORCER ***/ //       shortStop = new Date(2011,8,18,18,0,0); //      if (currentDate < shortStop) { //         alert("Wait until "+shortStop.toLocaleString); //         location = "http://"+location.host+"/w/index.php?title=" //		+ "Special:Userlogout&returnto=Main_Page"; //      } });