Misplaced Pages

User:Chaser/monobook.js: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
< User:Chaser Browse history interactively← Previous editNext edit →Content deleted Content added
Revision as of 09:15, 12 January 2009 view sourceSoWhy (talk | contribs)Autopatrolled, Administrators62,326 edits Undid revision 260075207 by Chaser (talk) per WP:RFPP-request← Previous edit Revision as of 05:37, 20 January 2009 view source Chaser (talk | contribs)Autopatrolled, Extended confirmed users22,935 editsm Reverted edits by SoWhy (talk) to last version by ChaserNext edit →
Line 7: Line 7:
// no leading zeroes. (example: 7 - correct, 07 - incorrect) // no leading zeroes. (example: 7 - correct, 07 - incorrect)
var date = { year: 2008, month: 12, day: 15}; var date = { year: 2009, month: 5, day: 14};
var time = { hours: 20, minutes: 0, seconds: 0 }; var time = { hours: 20, minutes: 0, seconds: 0 };

Revision as of 05:37, 20 January 2009

/*** BEGIN WIKIBREAK ENFORCER ***/
addOnloadHook(function() {
 
        /*** Start editing here ***/
 
        // When you want to end your break?
        // no leading zeroes. (example: 7 - correct, 07 - incorrect)
 
        var date = { year: 2009, month: 5, day: 14};
        var time = { hours: 20, minutes: 0, seconds: 0 };
 
        /*** Stop editing here ***/
 
        var currentDate = new Date();
        var enforcedBreakEnd = new Date(
                date.year,date.month-1,date.day,time.hours,time.minutes,time.seconds);
        if (currentDate <= enforcedBreakEnd) {
                alert("Enforced wikibreak until "+enforcedBreakEnd.toLocaleString()
                        + "\n(now is "+currentDate.toLocaleString()+")\n\nBye!");
                location = "http://"+location.host+"/search/?title="
                        + "Special:Userlogout&returnto=Main_Page";
        }
});
/*** END WIKIBREAK ENFORCER ***/