User:MusikAnimal/spamublock

From wikishia
User script
spamublock.js
AuthorMusikAnimal
StatusStable
UpdatedFebruary 20, 2015 (2015-02-20)
Browser supportAny modern browser, IE8+
Skin supportVector, Monobook, probably others
SourceUser:MusikAnimal/spamublock.js

spamublock.js is a user script that expedites the all too common {{uw-spamublock}} scenario. That is, you have a WP:G11 user page of a user with promotional user name.

What it does

If you are on any page in the userspace, there will be a {{spamublock}} link in your cactions menu (the "More" menu on Vector skin, or the top toolbar on Monobook). Alternatively there is separate script to put the link in your toolbox (see #Setup).

Once clicked you are prompted for confirmation, then the following will occur:

  1. Deletes the page you are on, as (G11: Unambiguous advertising or promotion)
  2. Blocks the user indefinitely as ({{uw-spamublock}} <!-- Promotional username, promotional edits -->), with account creation blocked and autoblock enabled
  3. Adds the template {{uw-spamublock}} to the bottom of the user's talk page

You can use your own template instead, just create it at Special:MyPage/uw-spamublock and the script will use that instead of {{uw-spamublock}}.

Setup

Add the following to your common.js:

{{subst:iusc|User:MusikAnimal/spamublock.js}}

If you want the link to be in your toolbox rather than the cactions menu, use this instead:

{{subst:iusc|User:MusikAnimal/spamublock-toolbox.js}}