Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 A word about security  





2 List of user scripts  





3 Using scripts: Frequently asked questions  



3.1  Where can I find user scripts?  





3.2  How do you install user scripts?  



3.2.1  Automatic installation  





3.2.2  Manual installation  





3.2.3  Remote scripts  







3.3  How do you add new scripts to the scripts list?  







4 Writing user scripts  



4.1  Snippets  







5 See also  



5.1  Userbox  







6 See also  














Wikipedia:User scripts







Български
Čeština
Deutsch
فارسی
Français

עברית
Kurdî

Português
Русский

Српски / srpski
Suomi
ி

Türkçe
Українська
Tiếng Vit


 

Edit links
 









Project page
Talk
 

















Read
View source
View history
 








Tools
   


Actions  



Read
View source
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 




In other projects  



Wikimedia Commons
MediaWiki
Wikidata
Wiktionary
 
















Appearance
   

 





Page semi-protected

From Wikipedia, the free encyclopedia
 


User scripts are programs written in JavaScript to facilitate the editing of Wikipedia. User scripts enable user accounts to do things they otherwise couldn't. Many user scripts are available, ready for you to install. Also, you can write a new user script, either by modifying an existing script or by starting from scratch.

WikiProject JavaScript is a collaboration of editors to improve Wikipedia's JavaScript coverage, write user scripts, and maintain user script-related pages (like the one you are reading right now). If you would like to join, sign up here.

A word about security

User scripts have unlimited access to your account by their very nature – 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 Wikipedia, it can do. As such, and this is especially pertinent to users with advanced permissions, make sure that you trust the user who wrote the script, as you will be held responsible for any actions it takes on your behalf. If you are "importing" a script (instead of copying the code itself) be warned that the user you are importing from could alter their script at any time. Only import from users you trust.

List of user scripts

If you come across or write a user script, please add it to Wikipedia:User scripts/List.

Don't see what you need? You can make a request for a new user script at Wikipedia:User scripts/Requests.

Using scripts: Frequently asked questions

Where can I find user scripts?

Try these pages:

How do you install user scripts?

Automatic installation

  1. Check the checkbox at Preferences → Gadgets → Advanced → Tick Install scripts without having to manually edit JavaScript files (documentation) and click Save.
  2. Visit Wikipedia:User scripts/List.
  3. Click "Install" after each script name to install the script. Some scripts may require additional steps, so be sure to visit the documentation if any.

Manual installation

  1. First, make sure you are registered and 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:Lusc|script_path}} – replace "script_path" with the full name of the .js page that opens when a script's "(source)" link is clicked. The Load user script (Lusc) template will add the necessary mw.loader.load line along with a backlink.
    • For example, to install the Sharebox script, add the following line: {{subst:Lusc|User:TheDJ/sharebox.js}}
  4. Save the page and bypass your cache to make sure the changes take effect.

Remote scripts

  1. First, make sure you are registered and logged in. Only logged-in users can install scripts.
  2. Edit your common.js file. Alternatively, you may use your skin.js to work only your current skin.
  3. Add the following line: mw.loader.load( '//en.wikipedia.org/wiki/script_path?action=raw&ctype=text/javascript' );
    — where "script_path" is the full name of the .js page that opens when a script's "(source)" link is clicked.
    • 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.

How do you add new scripts to the scripts list?

Use {{user script table row}}. Include at least the code page path and a short description. For example:

{{user script table row
|name=My script
|code=User:Me/MyJSpage.js
|doc=User:Me/MyJSdocumentationPage
|desc=This script does something useful.
}}

Writing user scripts

Instructions for writing your own user scripts are included in Wikipedia:User scripts/Guide.

Additional script-writing resources are presented below.

Snippets

The following code snippets still exist under the now defunct WikiProject User scripts. Many are still in use by live scripts, and they may provide insights for current script developers.

Snippets

This list is transcluded from Wikipedia:User scripts/Snippets.

See also

Userbox

Want to advertise your user script development skills?

Markup Renders as
{{user script developer}}
This user develops
user scripts;
{{user script developer2}}
This user develops user scripts.
{{user scripts created}}
This user has created a user script;
{{user scripts created|99}}
This user has created 99 user scripts;

See also


Retrieved from "https://en.wikipedia.org/w/index.php?title=Wikipedia:User_scripts&oldid=1214179341"

Categories: 
Wikipedia information pages
Wikipedia scripts
Hidden category: 
Wikipedia semi-protected project pages
 



This page was last edited on 17 March 2024, at 11:13 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki