User:Animum/EasyBlock
{{warning|Disclaimer: This script will not work for non-admins, and intentional misuse of this tool is not my fault.
In addition, this tool does not work in the Vector skin.
}}
{{shortcut|WP:ESB|WP:EASYBLOCK}}
EasyBlock (source) is one of my scripts that aids admins who often do routine blocks, such as those for vandalism, username violations, or sockpuppeteering.
This tool will display a "block" tab, which, when the mouse hovers over it, will display a list of block options on the following pages/namespaces (see below for display options, and please read how the script detects usernames):
::*User: or User_talk: namespaces
::*Special:BlockList, after unblocking a user
::*Any diff screen
If useAutoWarn
(see below) is not set to false, it will also automatically warn (depending on the type of block done, it may also tag) users after they've been blocked.
__TOC__
Configuration
= Installation =
To install this application, add the following code to your monobook exactly as it appears when viewing this page, and bypass your cache:
importScript("User:Animum/easyblock.js"); //User:Animum/easyblock.js
= ebPrefs =
EasyBlock has eight available preferences:
(Note: For the purposes of the table below, "edits" is defined as "the warnings or notifications the script will post when automatically warning a user.")
class="wikitable"
! Preference !! Values !! Default !! Description |
markWarnAsMinor
| | | Leaving this variable as |
showOnPages
| | All of them | This preference, which must be declared in array form, governs which pages will have "block" tabs. For example, if you do not want it to show on diff screens, all you have to do is remove |
useAutoWarn
| | | |
loadPageOnSubmit
| | | |
displayStatus
| | | |
watchlistEnabled
| | | |
showOnClick
| | | |
returnTo
| Any string (wrapped in "quotes") | The last page the script edited | The script will return to whatever page you specify, which must be in URL form (underscores instead of spaces, etc.). For example, if I set this variable to |
To set one or more of the preferences to a value, use the key : value,
pattern, which Twinkle also uses. Assume that I want to set useAutoWarn
to false
, displayStatus
to false
, and to make the tab hidden on Special:Block. I would need to add the following to my monobook:
ebPrefs = {
useAutoWarn : false,
displayStatus : false,
showOnPages : ["user_usertalk", "contribs", "diffs", "ipblocklist"]
};
:Note: The last key : value
entry should not have a comma after it.
If you want another configurable option or need to report a bug, you can leave me a message, send me an e-mail, or contact me on IRC (if I so happen to be there). The preferred method, however, is the first one because others can act on the requests if I can't.
User detection methods (very important)
The following is the methodology this script uses to gather the username of the user to block:
- On Special:Block, the name of the user who would be blocked per the normal means otherwise;
- On User: or User_talk: pages, the name of the corresponding user, except for diffs, which will take the name of the user who made that specific edit;
- On diffs of any page, the name of the user who made the edit will override any other data the script would normally collect. For instance, the username would be "Animum" on my talk page except when viewing [https://en.wikipedia.org/w/index.php?title=User_talk:Animum&diff=next&oldid=294010025 a diff], which will take the name of the user who made the edit (in this case, Aitias);
- On Special:Contributions, the name of the user whose contributions are being queried; and
- On Special:BlockList, the name of the user who was just unblocked (the tab will only appear after a successful unblock).
A note about sockpuppet blocks
When using this script, please only use the "confirmedsock" option if there is specific CheckUser evidence; please use the "suspectedsock" option for all other cases.