Revision as of 14:10, 16 March 2023 edit208.184.250.140 (talk)No edit summaryTags: Reverted Mobile edit Mobile web edit← Previous edit | Revision as of 14:10, 16 March 2023 edit undo208.184.250.140 (talk)No edit summaryTags: Reverted Mobile edit Mobile web editNext edit → | ||
Line 1: | Line 1: | ||
== Configuration == | == Configuration == | ||
=== Installation === | |||
To install this application, add the following code to your ] exactly as it appears when viewing this page, and ]: <!-- NOTE: Please copy the JavaScript inclusion code AS IT APPEARS WHEN VIEWING THE PAGE, not as it appears when editing it. --> | |||
<syntaxhighlight lang="JavaScript"> | |||
importScript("User:Animum/easyblock.js"); //] | |||
</syntaxhighlight> | |||
=== ebPrefs === | === ebPrefs === | ||
EasyBlock has eight available preferences: | EasyBlock has eight available preferences: |
Revision as of 14:10, 16 March 2023
Configuration
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.")
Preference | Values | Default | Description |
---|---|---|---|
markWarnAsMinor
|
true or false
|
true
|
Leaving this variable as true will make the script mark edits as minor; setting it to false will make it not mark edits as minor.
|
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 "diffs", from the list. If you leave only one option (e.g., "user_usertalk" ), there should be no commas within the brackets ( rather than ).
|
useAutoWarn
|
true or false
|
true
|
true will make the script automatically warn (and possibly tag) users after a block has been done; false will disable this function.
|
loadPageOnSubmit
|
true or false
|
true
|
true will force the script to redirect automatically to the last page it edits; false will make it do the opposite.
|
displayStatus
|
true or false
|
true
|
true makes the script display status updates, such as "User has been blocked"; false makes the script not display these updates. The background color will still change, however, regardless of the value of this variable.
|
watchlistEnabled
|
true or false
|
false
|
true has the script add the blocked user's talk page to your watchlist, whereas false does not.
|
showOnClick
|
true or false
|
false
|
true will make the drop-down list appear only after clicking on the tab; false will make the list appear when the cursor moves over the block tab.
|
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 "Misplaced Pages:Administrator_intervention_against_vandalism&action=purge" , I would be taken to a purged AIV page after the script finishes its job.
|
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 : };
- 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 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.