User:Shahadat/script-installer
File:Screenshot of Shahadat's script-installer in use.png | |
Description | Convenient script installation |
---|---|
Author(s) | Shahadat |
Status | Stable |
Updated | November 10, 2020 |
Browser support | All modern browsers, and IE 11 |
Skin support | All desktop skins |
Source | MediaWiki:Gadget-script-installer.js |
Install, uninstall, enable, and disable user scripts without having to edit your JavaScript files.
Installation instructions
In your preferences, go to Preferences → Gadgets. At the bottom of the "Advanced" section, click the "Install scripts without having to manually edit JavaScript files (documentation)" checkbox, then click the "Save" button.
Usage
- If you go to a user script page (like User:Shahadat/reply-link.js), there will now be an "Install" link at the top. Clicking it will install the script and reload the page. Certain pages may have this option disabled.
- Also on user script pages, there will be a "Manage user scripts" option at the top, which will show you a list of all of your user scripts, with options to uninstall (i.e. remove entirely) or disable ("comment out" the user script, without permanently removing it; enable will undo this).
- JP:US/L and other pages that use {{userscript}} will now show script links with a little "Install" link after them.
Options
The script has a number of options that allow you to customize its behavior. To set any of the preferences, follow the following pattern (on a new line in your common.js file):
window.OPTION = VALUE;
For example, if I wanted to, by default, install new scripts to my my monobook.js page instead of my common.js page, I would set the option scriptInstallerInstallTarget
to "monobook"
by putting the following line somewhere in my common.js:
window.scriptInstallerInstallTarget = "monobook";
Name | Values (Default in bold) |
Description |
---|---|---|
scriptInstallerInstallTarget
|
"common" , "monobook" , "timeless" , "skin name goes here"
|
What skin should scripts be installed for? (Equivalently, what target page should scripts be installed on?) |
scriptInstallerAutoReload
|
true , false
|
Should the script reload after installing, uninstalling, and other actions? |
Future improvements
People have asked for these, but I don't plan to work on them myself. If anyone would like to try doing it themselves, I would be happy to mentor them through the process:
- Support for global scripts installed at Meta
- Support for the User:MusikAnimal/scriptManager format
- Bulk actions, especially bulk deletion
See also
{{User wikipedia/script-installer}}, a userbox indicating an editor uses script-installer
Script Attribution
![]() | This script was manually imported from Wikipedia in compliance with their CC-BY-SA license. This script is utilized either partially or in full, incorporating corrections, modifications, or imported from the original script. For details regarding the original script and its creator, please refer to the following link: https://en.wikipedia.org/wiki/User:Enterprisey/script-installer |