User:Lakmi00/common.js

importStylesheet('MediaWiki:Gadget-WatchlistBase.css'); // Linkback: MediaWiki:Gadget-WatchlistBase.css importScript("User:Writ Keeper/Scripts/massRevdel.js"); importScript("User:Writ Keeper/Scripts/teahouseTalkbackLink.js"); importScript("User:Abkhalias/scripts.js"); mw.loader.load('//en.wikipedia.org/w/index.php?title=User%3AWrit+Keeper%2FScripts%2FdeletionFinder.js&action=raw&ctype=text/javascript'); // User:Writ Keeper/Scripts/deletionFinder.js; // mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Hedonil/XTools/XTools.js&action=raw&ctype=text/javascript'); mw.loader.load("//de.wikipedia.org/w/index.php?title=Benutzer:TMg/autoFormatter.js&action=raw&ctype=text/javascript"); /* User:Zhaofeng Li/Reflinks.js */ importScript( 'User:Zhaofeng Li/Reflinks.js' );// Backlink: User:Zhaofeng Li/Reflinks.js // importScript('User:Equazcion/LiveDiffLink.js'); //Linkback: User:Equazcion/LiveDiffLink /* User:MusikAnimal/responseHelper.js */ importScript( 'User:MusikAnimal/responseHelper.js' );// Backlink: User:MusikAnimal/responseHelper.js importScript('User:MusikAnimal/userRightsManager.js'); //Linkback: User:MusikAnimal/userRightsManager.js importScript('User:Plastikspork/admindash.js'); importScript('User:Mr.Z-man/closeAFD2.js'); // Linkback: User:Mr.Z-man/closeAFD2.js importScript('User:Timotheus Canens/spihelper.js');

//Add sidebar links mw.util.addPortletLink('p-navigation', mw.config.get( 'wgServer' ) + '/wiki/Wikipedia:Administrators\' noticeboard/Incidents', "WP:ANI"); mw.util.addPortletLink('p-navigation', mw.config.get( 'wgServer' ) + '/wiki/Wikipedia:Administrators\' noticeboard', "WP:AN");

//Mass rollback function //Written by John254 and modified/rewritten by Writ Keeper; original is at https://en.wikipedia.org/wiki/User:John254/mass_rollback.js //Adapted from User:Mr.Z-man/rollbackSummary.js //Instructions: Selecting the "rollback all" tab when viewing a user's contributions history //will open all rollback links displayed there. (Use with caution) function rollbackEverythingWKMR {	var userName = /Contributions\/(.+)/.exec(mw.config.get("wgTitle"))[1]; var tokenRegex = /token=([^&]+)/; var titleRegex = /title=([^&]+)/; $("a[href*='action=rollback']").each(function(ind, el)	{		var regexResults = tokenRegex.exec(el.href);		rollbackToken = decodeURIComponent(regexResults[1]);		var postInfo = {action:"rollback",title:titleRegex.exec(el.href)[1],token:rollbackToken,user:userName};		$.post("/w/api.php", postInfo, function {			$(el).after("reverted"); $(el).remove; });	}); } $(document).ready(function {	if(mw.config.get("wgCanonicalSpecialPageName") == "Contributions" && $("span.mw-rollback-link").length > 0)	{		mw.util.addPortletLink('p-cactions', 'javascript:rollbackEverythingWKMR', "rollback all", "ca-rollbackeverything", "rollback all edits displayed here");		$("#ca-rollbackeverything").click(function{return confirm("Really rollback *everything*?")});	} });