Jump to content

User:Anon126/common.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Anon126 (talk | contribs) at 23:16, 29 January 2018 (add wikibreak enforcer). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
//importScript('Wikipedia:Igloo/gloo.js'); // [[Wikipedia:Igloo]]
mw.loader.load('/w/index.php?title=User:Jackmcbarn/editProtectedHelper.js&action=raw&ctype=text/javascript'); // Linkback: [[User:Jackmcbarn/editProtectedHelper.js]]
mw.loader.load('/w/index.php?title=Wikipedia:AutoEd/complete.js&action=raw&ctype=text/javascript'); // [[WP:AED]]
mw.loader.load('/w/index.php?title=User:Anon126/Scripts/EditColorizer.js&action=raw&ctype=text/javascript');

/*** BEGIN WIKIBREAK ENFORCER ***/
$(document).ready(function() {

	/*** Start editing here ***/

	// When you want to end your break?
	// no leading zeroes. (example: 9 - correct, 09 - incorrect)

	var date = { year: 2018, month: 2, day: 3 };
	var time = { hours: 20, minutes: 0, seconds: 0 };

	/*** Stop editing here ***/
	
	var currentDate = new Date();
	var enforcedBreakEnd = new Date(Date.UTC(
		date.year,date.month-1,date.day,time.hours,time.minutes,time.seconds));
	if (currentDate <= enforcedBreakEnd) {
		alert("Enforced wikibreak until "+enforcedBreakEnd.toUTCString()
			+ "\n(now is "+currentDate.toUTCString()+")\n\nBye!");
		location = "//"+location.host+"/w/index.php?title="
			+ "Special:Userlogout&returnto=Main_Page";
	}
});
/*** END WIKIBREAK ENFORCER ***/