RationalWiki's 2018 Fundraiser

There is no RationalWiki without you. We are a small non-profit with no staff — we are hundreds of volunteers who document pseudoscience and crankery around the world every day. We will never allow ads because we must remain independent. We cannot rely on big donors with corresponding big agendas. We are not the largest website around, but we believe we play an important role in defending truth and objectivity.

If everyone seeing this today donates $5, we will meet our goal for 2018.

Fighting pseudoscience isn't free.
We are 100% user-supported! Help and donate $5, $20 or whatever you can today with PayPal Logo.png!

Donations so far: $2951Goal: $5000

Help:Scripts

From RationalWiki
Jump to: navigation, search

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.

Gadgets[edit]

Fake name
Adds (Fake name) after your username in places like Template:USERNAME and Template:Assquote.
HotCat
Easily add / remove / change a category on a page, with name suggestion. For more information go to Wikipedia:HOTCAT
Navigation popups
Creates a popup box when you hover over a link that has various features. For more information go to Wikipedia:Tools/Navigation_popups
Link to your sandbox
Adds a link to the user sandbox to the userbar at the top of the page.

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:
1 randomanyns = {
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.

See Also[edit]