Jump to content

Wikipedia:User script sandbox/Installation

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by PhilKnight (talk | contribs) at 18:22, 20 July 2014 (Reverted edits by 180.234.80.17 (talk) to last version by Kephir). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

To install the user script sandbox user script, add the following code to your skin.js or common.js page:

mw.loader.load( "//en.wikipedia.org/w/index.php?title=User:PleaseStand/userScriptSandbox.js&action=raw&ctype=text/javascript" );

Bypass your browser's cache if you need to, and then go to Project:User script sandbox to edit the contents of your local sandbox, which are not saved to a wiki page. Note that the script will not work on older browser versions such as Internet Explorer 6 or 7 because those browser versions do not support Web storage. To make this script work in wikis other than Wikipedia, copy the contents of Project:User script sandbox into a page with the same name in your wiki's Project: namespace; the editor will be available on that page.

This script's source code is at User:PleaseStand/userScriptSandbox.js, as PleaseStand is its current maintainer. Be sure to leave a message if you like the script, have suggestions for improvement, or simply want to use it elsewhere.

Alternative version

A semi-experimental fork of the script is located at User:Kephir/gadgets/jssand.js. It adds the Ace editor and a confirmation dialog before closing the page with unsaved changes. Install it with this line:

mw.loader.load( "//en.wikipedia.org/w/index.php?title=User:Kephir/gadgets/jssand.js&action=raw&ctype=text/javascript" ); // [[User:Kephir/gadgets/jssand.js]]