User:~riley/sock.js
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.
Documentation for this user script can be added at User:~riley/sock. |
//<nowiki>
/*
* [[m:user:Hoo man]]; Version 1.0.0; 2012-08-09;
* This tool can tag pages with a few clicks (which is much faster than editing the whole page per Hand).
* Per default it is able to tag page for speedy deletion using {{delete}}, but it can be customized to use up to every template.
* Uses tagger-core.js
* Tested in IE and FF with vector and monobook, uses my (Hoo man) wiki tools (functions.js)
*
* DO NOT COPY AND PASTE, instead see http://meta.wikimedia.org/wiki/User:Hoo_man/Scripts/Tagger
*/
if(typeof(hoo) === 'undefined') {
var hoo = {};
}
/*global mediaWiki, hoo */
/*jshint forin:true, noarg:true, noempty:true, eqeqeq:true, bitwise:true, strict:true, undef:true, unused:true, curly:true, browser:true, jquery:true, indent:4, maxerr:50, loopfunc:true, white:false */
(function(mw, $) {
"use strict";
var taggerDefaultConfig = {};
//templates and edit summaries
taggerDefaultConfig.tags = {};
taggerDefaultConfig.editSummary = {};
taggerDefaultConfig.tags[1] = '{{sockpuppet category}}';
taggerDefaultConfig.editSummary[taggerDefaultConfig.tags[1]] = 'Creating sockpuppet category';
if(typeof(window.taggerConfig) === 'undefined') {
window.taggerConfig = {};
}
var init = function() {
$.ajax({
url: '//meta.wikimedia.org/w/index.php?title=User:Hoo_man/tagger-core.js&action=raw&ctype=text/javascript',
dataType: 'script',
cache: true,
success: function() { hoo.instances.tagger = new hoo.tagger(taggerDefaultConfig, window.taggerConfig); }
});
};
if(typeof(hoo.objectDiff) === 'undefined') {
if(typeof(hoo.load) === 'undefined') {
hoo.load = [ init ];
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Hoo_man/functions.js&action=raw&ctype=text/javascript');
}else{
hoo.load.push( init );
}
}else{
init();
}
})(mediaWiki, jQuery);
//</nowiki>