User:Hoo man/Scripts/Smart rollback
Smart rollback provides several useful functions for rollback. It (per default) can be accessed from the top right (under the links to eg. My Contributions).
It provides the following functions:
- Changing the rollback edit summary (for all revert links on page)
- you can select predefined values or enter a custom edit summary
- Mark rollbacks as bot edits (for all rollbacks on page), only works if you have the required permission (only administrators and global rollbackers have)
- Mass revert (uses all rollback links on the current page)
- This supports the above options as well (custom edit summary and mark as bot edit)
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
editInstallation
editTo use smart rollback, you just have to paste this code in your common.js (or into your global.js if you want to use it on all Wikimedia Wikis):
// Provides several useful functions for rollback (custom edit summary, mark as bot edits and mass revert)
// by [[m:user:Hoo man]] <https://meta.wikimedia.org/wiki/User:Hoo_man/Scripts/Smart_rollback>
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Hoo_man/smart_rollback.js&action=raw&ctype=text/javascript');
Please leave the [[File:Hoo man/smart_rollback.js]] in for statistics and add yourself to the user list at the bottom of this page
Afterwards you may have to clear your cache:
How to clear the cache
|
---|
Note: After publishing, you may have to bypass your browser's cache to see the changes.
|
Please note: The links at the top are only going to appear if there is at least one rollback link on the page.
Customization
editYou 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.
- To fully disable the script
var disable_smart_rollback = true;
- To have the link to the tool at another place
if(typeof(smartRollbackConfig) === 'undefined') smartRollbackConfig = {};
smartRollbackConfig.toolLinkMethod = 'FOO';
- Can take all values which are possible in addPortletLink
- To change the edit summaries you can select just add
- (use the lines with the numbers in [] to get more (or less) rows)
if(typeof(smartRollbackConfig) === 'undefined') smartRollbackConfig = {};
smartRollbackConfig.editSummaries = {};
smartRollbackConfig.editSummaries[0] = 'revert; vandalism';
smartRollbackConfig.editSummaries[1] = 'another edit summary which can be chosen';
smartRollbackConfig.editSummaries[2] = 'and another one';
Of course you can as well insert a custom edit summary into the window.
- To manually set the language (will default to the language set in MediaWiki or to hooConfig.lang (see Scripts#Global_settings for further information), of course only available languages can be chosen)
if(typeof(smartRollbackConfig) === 'undefined') smartRollbackConfig = {};
smartRollbackConfig.lang = 'en';
- To enable (true) or disable (false) markbotedits manually (if the script doesn't recognize that correctly or at your choice)
if(typeof(smartRollbackConfig) === 'undefined') smartRollbackConfig = {};
smartRollbackConfig.enableMarkbotedits = true;
- To enable one click bot revert links (those will be shown just after the normal ones)
if(typeof(smartRollbackConfig) === 'undefined') smartRollbackConfig = {};
smartRollbackConfig.oneClickBotLinks = true;
- The tool is fully localizable, translations are loaded from meta, if available. If you want to submit a new translations, take a look at User:Hoo man/lang/en/smart rollback.js and send me a localized version (post it to User_talk:Hoo_man/Scripts). Meta administrators can feel free to edit translations at their own, if they know what they're doing.
Users
edit- Antimuonium (fr-wiki)
- Bencemac (global)
- Bencmq (global and zhwiki)
- Brewster239 (global)
- Kaniivel (used as a gadget on et-wiki)
- Dragoniez (global)
- Eihel (global)
- Eurodyne (global)
- Fehufanga (global)
- Ferien (global)
- FlyingAce (global)
- Framawiki (fr-wiki)
- Hoo man (global)
- Hosiryuhosi (global)
- Hydriz (global)
- Infinite0694 (global)
- Iste Praetor (de-wiki)
- Ixocactus (pt-wiki)
- JohnNewton8 (fr-wiki)
- LlamaAl (global)
- MalTsilna (global)
- Masumrezarock100 (global)
- Mathonius (global)
- Matiia (global)
- MBq (de-wiki)
- Milonica (en-wiki and global)
- PiRSquared17 (global)
- Pmlineditor (global)
- Portal18 (global)
- Ralgis (global)
- Sam Sailor (global)
- Sanjeev Kumar (global)
- Saurabh Saha (global)
- Savh (global and es-wiki)
- Schniggendiller (global)
- ShifaYT (fr-wiki)
- Southparkfan (global)
- Syum90 (global)
- TBloemink (global, nlwiki)
- TenWhile6 (global)
- Thehelpfulone (global)
- Tomybrz (fr-wiki)
- Udo T. (de-wikt)
- VateGV (fr-wiki)
- Wiki13 (global
- Wikitanvir (global)
- Wnme (de-wiki)
- XenonX3 (global)
- Zhuyifei1999 (commons)
- Zulf (global)
- علاء (global)
- QueerEcofeminist (global)