User:Hoo man/Scripts/Tagger

From Meta, a Wikimedia project coordination wiki
Jump to navigation Jump to search
Screenshot of the tagger window

The tagger 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 pages for speedy deletion using {{delete}}, but it can be customized to use up to every template.
If you found a bug in this script or if you have a feature request please leave it here or ping me on IRC (hoo).

Installation and customization[edit]

Installation[edit]

To use the tagger, you just have to paste this code in your vector.js or monobook.js (or into your global.js if you want to use it project wide):

// This tool can tag pages with a few clicks (which is much faster than editing the whole page per Hand).
// by [[m:user:Hoo man]] <https://meta.wikimedia.org/wiki/User:Hoo_man/Scripts/Tagger>
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Hoo_man/tagger.js&action=raw&ctype=text/javascript');

Afterwards you may have to clear your cache:

How to clear the cache

Note: After saving, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.

Customization[edit]

You can customize the tool in many ways (you can eg. completely translate it), here are the most important things you can change. Just append this to your JS file, before loading the script.

If you want to have it active only if you haven't got the delete right
if(typeof window.taggerConfig === 'undefined') window.taggerConfig = {};
taggerConfig.noDeleteOnly = true;
To fully disable the script
var disable_tagger = true;
To change the available templates and the edit summaries which are used by default, add this
//<nowiki>
if(typeof window.taggerConfig === 'undefined') window.taggerConfig = {};
taggerConfig.tags = [];
taggerConfig.editSummary = [];
taggerConfig.tags[1] = '{{delete|nonsense - ~~~~}}';
taggerConfig.editSummary[taggerConfig.tags[1]] = '+ delete';
taggerConfig.tags[2] = '{{mytemplate|first argument}}';
taggerConfig.editSummary[taggerConfig.tags[2]] = 'the edit summary which is per default used when using the above template';
//</nowiki>
To activate section tagging
if(typeof window.taggerConfig === 'undefined') window.taggerConfig = {};
taggerConfig.allowSectionTags = true;
To change the default value ('{{') of the custom tag field add
if(typeof window.taggerConfig === 'undefined') window.taggerConfig = {};
taggerConfig.customTagDefault = 'abcdefg';
To have the link to the tool at another place
if(typeof window.taggerConfig === 'undefined') window.taggerConfig = {};
taggerConfig.toolLinkMethod = 'FOO';
Can take all values which are possible in addPortletLink and 'toolbar'

Users[edit]

Projects[edit]