Jump to content

User:AssumeGoodWraith/common.js

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by AssumeGoodWraith (talk | contribs) at 15:09, 1 March 2025 (Restoring revision 1273267183 by AssumeGoodWraith: (UV 0.1.6)). The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
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('User:Writ Keeper/Scripts/massRollback.js'); // Backlink: [[User:Writ Keeper/Scripts/massRollback.js]]
importScript('User:Jackmcbarn/editProtectedHelper.js'); // Linkback: [[User:Jackmcbarn/editProtectedHelper.js]]
mw.loader.load( '/w/index.php?title=User:AssumeGoodWraith/redwarn.js&action=raw&ctype=text/javascript' ); // Backlink: [[User:AssumeGoodWraith/redwarn.js]]
mw.loader.getScript("/w/index.php?title=User:Guywan/Scripts/ConfirmLogout.js&action=raw&ctype=text/javascript");
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Joeytje50/JWB.js/load.js&action=raw&ctype=text/javascript');
$( '#ca-nstab-user a' ).text( 'Humaning page' );
$( '#ca-talk a' ).text( 'Human talking' );
$( '#ca-history a' ).text( 'History of vandalism' );
$( '#ca-edit a' ).text( 'Edit' );
$( '#ca-viewsource a' ).text( 'Edit: Insufficient permissions' );
$( '#ca-nstab-main a' ).text( 'Main Article' );
function catsattop() {
  var cats = document.getElementById('catlinks');
  var bc = document.getElementById('bodyContent');
  bc.insertBefore(cats, bc.childNodes[0]);
}

mw.util.addPortletLink ('p-tb', '/wiki/User:AssumeGoodWraith/Template_Sandbox', 'Template Sandbox');
mw.util.addPortletLink ('p-tb', '/wiki/Special:PendingChanges', 'Pending Changes');
mw.util.addPortletLink ('p-tb', '/wiki/User:AssumeGoodWraith/Vandalism', 'Vandalism statistics');
mw.util.addPortletLink ('p-tb', '/wiki/Special:Log', 'Log');
mw.util.addPortletLink ('p-tb', '/wiki/Special:Log?type=newusers&user=&page=&wpdate=&tagfilter=&wpfilters%5B%5D=newusers', 'User Creation Log');
mw.util.addPortletLink ('p-tb', '/wiki/User:AssumeGoodWraith/CSD_log', 'My CSD log');
mw.util.addPortletLink ('p-tb', '/wiki/Special:AbuseLog', 'Abuse log');
mw.util.addPortletLink ('p-tb', '/wiki/Wikipedia:AIV', 'AIV');
mw.util.addPortletLink ('p-tb', '/wiki/Wikipedia:UAA', 'UAA');
mw.util.addPortletLink ('p-tb', '/wiki/Wikipedia:RFPP', 'RFPP');
mw.util.addPortletLink ('p-tb', '/wiki/Special:NewPages', 'New pages');
mw.util.addPortletLink ('p-tb', '/wiki/Special:NewPagesFeed', 'PageTriage');


mw.loader.load( '/w/index.php?title=User:Evad37/OneClickArchiver.js&action=raw&ctype=text/javascript' ); // Backlink: [[User:Evad37/OneClickArchiver.js]]
mw.loader.load( '/w/index.php?title=User:Evad37/MoveToDraft.js&action=raw&ctype=text/javascript' ); // Backlink: [[User:Evad37/MoveToDraft.js]]

/*** 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: 2022, month: 4, day: 1};
	var time = { hours: 0, 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!");
		mw.loader.using(["mediawiki.api", "mediawiki.user"]).then(function ()
		{
			new mw.Api().post(
			{
				action: 'logout',
				token: mw.user.tokens.get('csrfToken')
			}).done(function (data)
			{
				location = "//" + location.host + "/w/index.php?title="
					 + "Special:Userlogin&returnto=Main_Page";
			}).fail(function ()
			{
				console.log("logout failed")
			});
		});
	}
});
/*** END WIKIBREAK ENFORCER ***/