Jump to content

User:BU Rob13/common.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Renamed user mou89p43twvqcvm8ut9w3 (talk | contribs) at 00:31, 13 April 2016 (move up). 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.
//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() {
	$("a[href*='action=rollback']").each(function(ind, el)
	{
		window.open(el.href, "_blank");
	});
}
$(document).ready(function()
	{
		if(mw.config.get("wgCanonicalSpecialPageName") === "Contributions" && $("span.mw-rollback-link").length > 0)
		{
			addPortletLink('p-cactions', 'javascript:rollbackEverythingWKMR()', "rollback all", "ca-rollbackeverything", "rollback all edits displayed here");
  		}
	});
	
function autotfd_result()
{
	var close = prompt("Result of debate?")
	var f = document.editform, t = f.wpTextbox1;
	t.value = t.value.split(']] ====').join(']] ====' + '\n' + '{{subst:' + 'tfd top' + '|1=' + '\'' + '\'' + '\'' + close + '\'' + '\'' + '\'' + '.|2=y}}');
	t.value += "{{subst:" + "tfd bottom" + "}}";
	f.wpSummary.value += "Closing debate; result was " + close + " (using [[User:Doug/closetfd.js]])";
}
 
function autotfd_add_tfd_tabs()
{
	// Only add for pages with the right string somewhere in the title
	if ((document.title.indexOf("Editing Wikipedia:Templates for discussion/Log/") != -1) && (document.title.indexOf("(section)") != -1))
	{
		addPortletLink('p-cactions', 'javascript:autotfd_result()', "close");
	}
}
//per [[User:Technical 13]] - see talk
$(autotfd_add_tfd_tabs);

/* User:Mr.Z-man/closeAFD.js */
importScript( 'User:Mr.Z-man/closeAFD.js' );// Backlink: [[User:Mr.Z-man/closeAFD.js]]

/* User:Technical_13/Scripts/OneClickArchiver */
importScript( 'User:Technical_13/Scripts/OneClickArchiver.js' );// Backlink: [[User:Technical_13/Scripts/OneClickArchiver]]

/* reflist */
mw.loader.load( "https://meta.wikimedia.org/w/index.php?title=User:Zhaofeng_Li/Reflinks.js&action=raw&ctype=text/javascript" );

/* allows searching templates by TP */
importScript('User:SiBr4/TemplateSearch.js');