Help:Scripts
This is a repository for scripts created by RationalWiki members or copied from other wikis. To use these, edit your common.js, and add a new line containing
mw.loader.load('path to script');
For example, if you'd like to use User:Nx/Scripts/AutoWIGO.js, you should add
mw.loader.load('User:Nx/Scripts/AutoWIGO.js');
Some of these are also available as gadgets, and can be selected on the "Gadgets" tab in your preferences.
Random Gadget
Go to your Preferences. Tick the gadgets you want to enable, then save.
✅ Hotcat, allows quick insertion and removal of categories.
Maintained[edit]
ClickClock[edit]
I currently have two scripts.
- Quick Sign
- This script allows faster signing of comments. Just press ~ and —~~~~ is generated.
- Vandal Catcher
- Adds a link to RW:Vandal catcher to user navigation bar.
Usage[edit]
To install go to: mypage/common.js.
Add this to install Quick Sign:
mw.loader.load('https://rationalwiki.org/w/index.php?title=User:ClickerClock/scripts/QuickSign.js&action=raw&ctype=text/javascript');
Add this to install Vandal Catcher:
mw.loader.load('https://rationalwiki.org/w/index.php?title=User:ClickerClock/scripts/VandalCatcher.js&action=raw&ctype=text/javascript');
If you need help with my scripts, you are free to ask on my user page.
JJPMaster[edit]
I really enjoy stealing scripts from Wikipedia creating user scripts for some reason, and here are a few:
- User:JJPMaster/common.js.js
- This script adds a link to common.js in your personal toolbar.
- User:JJPMaster/massRollback.js
- This script is supposed to allow you to revert all the edits made by a particular user at once. Use this script at your own risk; it can literally crash your computer if you leave it unattended. I learned that the hard way...
- User:JJPMaster/editcount.js
- This script shows the edit count of a user below their username on their user pages (note that this counts deleted contributions).
- User:JJPMaster/AutoWIGO2.js
- This script is an attempt at a fork of AutoWIGO that actually works, given that WIGO Coronavirus and WIGO Elections have been created, and WIGO aSK is gone.
- Usage
- I prefer that you install these scripts using the
{{rws}}
template (substitute it), which, if you put in your common.js, will automatically install the script, and make sure to use a parameter, which will be the name of the script, like {{subst:rws|User:JJPMaster/editcount.js}} for the edit count one. Or, for anything else related to my user scripts, contact me here.
Unmaintained[edit]
These scripts haven't been updated in years. They do not work properly, use at your own risk.
WIGO[edit]
- User:Nx/Scripts/AutoWIGO.js (gadget)
- Adds a toolbar button that inserts <vote poll=pollnameX></vote> tags when editing Conservapedia:What is going on at CP, RationalWiki:What is going on in the clogosphere?, RationalWiki:What is going on in the blogosphere? or RationalWiki:What is going on in the world?. X is automatically calculated by scanning the contents of the edit box, finding the largest poll number and incrementing it. This happens every time the page is loaded - including pressing the Show preview and Show changes buttons, and edit conflicts.
- User:Phantom Hoover/badwigo.js
- Removes WIGOs with votes lower than -5. Credit for creating the script goes to JeevesMkII.
Smileys[edit]
- User:Nx/Scripts/Smileybox.js (gadget)
- Adds a new button to the editing toolbar; click it to show a second toolbar with smileys. The toolbar shows all the images from Category:Smileys.
- User:Nx/Scripts/Smileylist.js (gadget)
- An alternative version, adds a smiley list to the edit tools. The list is hidden by default; click Smileys to show it.
Both versions may be active at the same time.
Bot accounts[edit]
- User:Nx/Scripts/Botwarn.js
- This script will warn you if you are a bot and try to edit a talk page. In strict mode, it will also warn you if you try to edit a page not in your userspace. To use strict mode, add "var nx_bw_strict = true;" before the mw.loader.load line. Use it if you often forget to log out of your bot account or remove your bot rights.
- User:Nx/Scripts/Botswitch.js
- Allows quick switching between two accounts. This script will add a "switch" link to the right of the log out link in the upper right corner. Passwords are optionally saved in cookies. For this script to work, add "var botswitch_altacc = "Alt";" before the mw.loader.load line, where Alt is the name of the account you wish to switch to. Warning: if you choose to save your password, anyone who can modify MediaWiki:Common.js or other users' interface files (techs and moderators) could write a malicious script to steal your password. It is therefore better to use the greasemonkey version of this script.
- Botswitch_greasemonkey.js
- The Greasemonkey version of the Botswitch script. It is more secure, since it uses Greasemonkey's internal storage instead of cookies, which is inaccessible to web pages. To use this, install Greasemonkey, copy the script into a text editor, modify the accounts array at the beginning of the script, and save it as a plain text file with the name "Botswitch.user.js". Then you can drag and drop the file into your browser to install it.
Sysops[edit]
- User:Nx/Scripts/Resurrect.js (gadget)
- Allows one-click restoration of pages, bypassing Special:Undelete (and the php script execution time limit). A "resurrect" tab will appear to the left of "undelete x edits", clicking it will restore the page. Note that for the tabs to appear, the page must be deleted entirely.
- User:Nx/Scripts/botrollback.js
- Adds a bot rollback link after normal rollback links, which marks both edits as bot edits.
Moderators[edit]
- User:Nx/Scripts/Userrights.js (gadget)
- Adds a "User rights" link in the toolbox that allows easy editing of a user's rights.
Misc[edit]
- User:Nx/Scripts/Addcomment.js
- Adds a convenient "Add comment" link to the bottom of talk page sections.
- User:Nx/Scripts/Editcount.js
- Adds an edit count below the page title on pages in the User and User talk namespaces.
- User:Nx/Scripts/HideFakeNotice.js
- Hide fake "you have new messages" notices that don't link to your talk page. It has two modes: default and strict. In default mode, the notice will only be hidden if it has a link with the text "new messages" or "last change" that does not point to your talk page. In strict mode, every notice with a link not pointing to your talk page will be hidden. To use strict mode, add "var nx_hfn_strict = true;" before the mw.loader.load line.
- User:Sid/HistDiff
- Adds color-coding to history.
- User:Nx/Scripts/RandomCP.js
- When viewing pages from the Conservapedia namespace, adds another random page link to the sidebar that selects from the Conservapedia namespace. Indents if randomcpindent is
true (var randomcpindent = true;)
. - User:Nx/Scripts/RandomAny.js
- Customizable version of the above. To indent, use
var randomanyindent = true;
. To configure, fill out the randomanyns array with lines like this:
<namespacenumber> : [<url escaped namespace name>, <name that appears in toolbar>, <name that appears in tooltip> ]
- For example:
1randomanyns = {
2 106 : ['Fun', 'Fun', 'Fun'],
3 107 : ['Fun' , 'Fun', 'Fun'],
4 2 : ['User_talk', 'talk', 'User talk'],
5 }
For script writers[edit]
- User:Nx/Scripts/Shared.js
- Code used by more than one script. You'll only need this if you're writing scripts, in that case your scripts should import this one so the user doesn't have to.