Soyjak Wiki:User scripts

From Soyjak Wiki, the free ensoyclopedia
Jump to navigationJump to search
(You) take all of the responsibilities using any user script. This means (obviously) following the Wiki rules when using this tool. Failure to do so will result in despicable things happening to you.
This topic relates to this very wikiHere be edit wars, censorship and template spam.

User scripts are programs written in JavaScript to facilitate editing in this very wiki. User scripts enable other accounts to do things that they otherwise could not do. Many of these scripts are available, completely ready for (You) to install. And you can make your own as well, by either modifying off of another existing script, or making your own.

Security

[edit | edit source]

User scripts have unlimited access to (you)r account, unlike OAuth/bot password based applications such as Huggle, where you can control access levels, the script runs in your browser. Anything you can do on Soyjak Wiki or any wiki at all, it can do. As such, and this is especially pertinent to users with advanced permissions, make sure that you actually trust the user who wrote the script, as you will be held responsible for any actions it takes on your behalf. So be careful, chud.

If you are importing a script, instead of copying the code itself, be warned that the user you are importing from can alter their script at any time. Only import from users you trust. Again, be careful, chud.

User scripts

[edit | edit source]

Search for user scripts

[edit | edit source]

Don't see what you need? You can simply search for an existing script.

Search within the code of user scripts:


Search user scripts by their title:


Installation

[edit | edit source]

Manual installation

[edit | edit source]

Method for scripts which are located on the English Wikipedia.

  1. First, make sure you are logged in. Only logged-in users can install user scripts.
  2. Click here to edit your common.js file.
  3. Add the following line: {{subst:Iusc|script_path}} – replace "script_path" with the full name of the .js page that opens when a script's "(source)" link is clicked. The Install user script (Iusc) template will add the necessary importScript() line along with a backlink.
    • For example, to install the Sharebox script, add the following line: {{subst:Iusc|User:TheDJ/sharebox.js}}
  4. Save the page and bypass your cache to make sure the changes take effect.

Remote scripts

[edit | edit source]

Method for scripts which are not located on the English Wikipedia.

Many of these scripts may not work at other wikis, either because the wiki has a different setup or their home wiki's URL is hardcoded into the script. Most script authors probably don't think about how to make their script work at other wikis. If you install a script globally, then you should avoid also keeping a copy in your local common.js file. Otherwise, the same script is loaded twice when using that wiki and may cause issues.

  1. First, make sure you are logged in. Only logged-in users can install scripts.
  2. Edit your common.js file on the other wiki. Alternatively, you may use your skin.js to work only your current skin.
  3. Add the following line, replacing SCRIPT_PATH with the full name of the .js page that opens when a script's "(source)" link is clicked:
    mw.loader.load( '//en.wikipedia.org/wiki/SCRIPT_PATH?action=raw&ctype=text/javascript' );
    For example, to install the NoEditSummary script, add the following line:
    mw.loader.load( '//en.wikipedia.org/wiki/User:GhostInTheMachine/NoEditSummary.js?action=raw&ctype=text/javascript' );
  4. Save the page and bypass your cache to make sure the changes take effect.