Misplaced Pages

User:Chaser/monobook.js: Difference between revisions

Article snapshot taken from[REDACTED] 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 22:09, 16 April 2009 view sourceOcee (talk | contribs)Extended confirmed users5,643 edits dunzo!← Previous edit Revision as of 22:20, 16 April 2009 view source Ocee (talk | contribs)Extended confirmed users5,643 editsm ah woopsNext edit →
Line 7: Line 7:
// no leading zeroes. (example: 7 - correct, 07 - incorrect) // no leading zeroes. (example: 7 - correct, 07 - incorrect)
var date = { year: 2009, month: 5, day: 14}; var date = { year: 2008, month: 12, day: 15};
var time = { hours: 20, minutes: 0, seconds: 0 }; var time = { hours: 20, minutes: 0, seconds: 0 };

Revision as of 22:20, 16 April 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: 2008, month: 12, day: 15};
        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 ***/
User:Chaser/monobook.js: Difference between revisions Add topic