Difference between revisions of "Help:Scripts"

From RationalWiki
Jump to navigation Jump to search
(RandomCP)
Line 30: Line 30:
 
;[[User:Ipatrol/popups.js]]:Creates a popup box when you hover over a link that has various features. For more information go to http://en.wikipedia.org/wiki/Wikipedia:Tools/Navigation_popups.
 
;[[User:Ipatrol/popups.js]]:Creates a popup box when you hover over a link that has various features. For more information go to http://en.wikipedia.org/wiki/Wikipedia:Tools/Navigation_popups.
 
;[[User:Ipatrol/reexamine.js]]:Adds a "reexamine" tab that purges the server cache of the page.
 
;[[User:Ipatrol/reexamine.js]]:Adds a "reexamine" tab that purges the server cache of the page.
 +
;[[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.
 
== For script writers ==
 
== For script writers ==
 
;[[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.
 
;[[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.

Revision as of 02:09, 9 April 2009

This is a repository for scripts created by RationalWiki members or copied from other wikis. To use these, edit your monobook.js or monobook_adfree.js (depending on the skin you use), and add a new line containing

importScript('path to script');

For example, if you'd like to use User:Nx/Scripts/AutoWIGO.js, you should add

importScript('User:Nx/Scripts/AutoWIGO.js');

WIGO

User:Nx/Scripts/AutoWIGO.js
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

User:Nx/Scripts/Smileybox.js
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
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

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 importScript 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 importScript 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 (i.e. sysops) 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

User:Nx/Scripts/Resurrect.js
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.

Misc

User:Nx/Scripts/Addcomment.js
Adds a convenient "Add comment" link to the bottom of talk page sections.
User:Π/Scripts/fakename.js
Adds (Fake name) after your username in places like Template:USERNAME and Template:Assquote.
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 importScript line.
User:Sid/HistDiff
Adds color-coding to history.
User:Ipatrol/popups.js
Creates a popup box when you hover over a link that has various features. For more information go to http://en.wikipedia.org/wiki/Wikipedia:Tools/Navigation_popups.
User:Ipatrol/reexamine.js
Adds a "reexamine" tab that purges the server cache of the page.
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.

For script writers

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