User:RP88/common.js

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: press Ctrl-F5, Mozilla: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Opera/Konqueror: press F5, Safari: hold down Shift + Alt while clicking Reload, Chrome: hold down Shift while clicking Reload.
// Add deletion links
window.AjaxDeleteExtraButtons = [{
		'label': 'SD F10 Personal',
		'tag': '{'+'{SD|F10}}',
		'img_summary': 'Marking for speedy deletion per [[COM:CSD#F10|CSD F10]]',
		'talk_tag': '{'+'{subst:speedynote|1=%FILE%|2=F10}}',
		'talk_summary': 'Notification of possible speedy deletion for %FILE% due to [[COM:CSD#F10|CSD F10]]',
	}, {
		'label': 'SD G10 Advert',
		'tag': '{'+'{SD|G10}}',
		'img_summary': 'Marking for speedy deletion per [[COM:CSD#G10|CSD G10]]',
		'talk_tag': '{'+'{subst:speedynote|1=%FILE%|2=G10}}',
		'talk_summary': 'Notification of possible speedy deletion for %FILE% due to [[COM:CSD#G10|CSD G10]]',
	}, {
		'label': 'Netcopyright',
		'tag': '{'+'{copyvio|1=[[COM:NETCOPYRIGHT|Copyright violation]], found elsewhere on the web and unlikely to be own work ([[COM:CSD#F1|F1]]).}}',
		'img_summary': 'Marking as possible copyvio because found elsewhere on the web and unlikely to be own work',
		'talk_tag': '{'+'{subst:copyvionote|1=%FILE%|2=[[COM:NETCOPYRIGHT|Copyright violation]], found elsewhere on the web and unlikely to be own work ([[COM:CSD#F1|F1]]).}}',
		'talk_summary': 'Notification of possible copyright violation for %FILE%',
	},
];

// Help:Gadget-UserMessages. 
// Welcome messages for user rights (see Category:User rights message templates)
$(document).bind('scriptLoaded', function(evt, st, o) {
	if (st) {
		if ('AxUserMsg' === st && o) {
			o.umTemplate.push(['Autopatrolgiven', "Autopatrol given", "After giving autopatrol rights to a user.", 128, "Just for your information: You are now [[COM:PATROL#Autopatrolled|autopatrolled]]."]);
			o.umTemplate.push(['PatrollerWelcome', "Patroller Welcome", "After giving patrol rights to a user.", 128, "Just for your information: Welcome you are now a [[COM:PATROL|patroller]]."]);
			o.umTemplate.push(['FilemoverWelcome', "Filemover Welcome", "After giving filemover rights to a user.", 128, "Just for your information: Welcome you are now a [[COM:RENAME|filemover]]."]);
		}
	}
});

// Mass rollback. 
importScript('User:RP88/massRollback.js');

// Magog's Cleanup script. The following hack adds link to the toolbar. 
importScript('User:Magog the Ogre/cleanup.js');

// Backlink: [[:en:User:MusikAnimal/confirmationRollback-mobile]] (ask for confirmation when rollback clicken on mobile device)
mw.loader.load('https://en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=MediaWiki:Gadget-confirmationRollback-mobile.js');

// Backlink: [[:en:User:Evad37/OneClickArchiver.js]] (archive a single discussion with a click, via an "archive" link)
mw.loader.load('https://en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:Evad37/OneClickArchiver.js'); 

var galleryPage = "User:RP88/test";
$.when(mw.loader.using('mediawiki.util'), $.ready).done(function () {
	// Aschroet's Search --> Gallery tool
	mw.util.addPortletLink('p-tb', 'javascript:importScript("User:RP88/gallery.js")', 'Create gallery');
});