විකිපීඩියා:User scripts
මෙම පිටුව ඉංග්රීසි ව්යාපෘතියෙන් මෙහි ගෙනවිත් ඇත. අන්තර්ගතය අපගේ ව්යාපෘතිය සමඟ 100% නොගැලපෙනමුත් අපගේ අවශ්යතාවයන් වලට අනුකූලව ගොඩනගා ගැනීම සඳහා මූලික පියවර ලෙස භාවිතා කළ හැකිය. |
මෙය තොරතුරු පිටුවකි. එය විකිපීඩියාවේ ප්රතිපත්ති සහ මාර්ගෝපදේශන එකතුවේ කොටසක් නොවේ, නමුත් විකිපීඩියාවේ ප්රතිමාන, සිරිත්, technicalities, සහ වත් පිළිවෙත් වල සමහර ලක්ෂණ විස්තර කිරීමට දරණ උත්සාහයකි. It may reflect varying levels of consensus and vetting. |
අවවාදයයි: any user script භාවිතයෙන් කරන සැම ක්රියාවකම සම්පූර්ණ වගකීම ඔබ භාර ගත යුතුය. විකිපීඩියාවේ ප්රතිපත්ති සහ නිර්ණායක හොඳින් කියවා තේරුම් ගෙන ක්රියා කල යුතුය. නැතහොත් ඔබව වාරණයට ලක්වීමට ඉඩ ඇත. |
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:
- Wikipedia:User scripts/List – main script list
- Category:Wikipedia scripts – the category page
How do you install user scripts?
[සංස්කරණය]Automatic installation
[සංස්කරණය]- Check the checkbox at මනාප → Gadgets → Advanced → and click Save.
- Visit Wikipedia:User scripts/List.
- 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
[සංස්කරණය]- First, make sure you are registered and logged in. Only logged-in users can install user scripts.
- Click here to edit your common.js file.
- 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 necessarymw.loader.load
line along with a backlink.- For example, to install the Sharebox script, add the following line:
{{subst:Lusc|User:TheDJ/sharebox.js}}
- For example, to install the Sharebox script, add the following line:
- Save the page and bypass your cache to make sure the changes take effect.
Remote scripts
[සංස්කරණය]- First, make sure you are registered and logged in. Only logged-in users can install scripts.
- Edit your common.js file. Alternatively, you may use your skin.js to work only your current skin.
- 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' );
- 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. }}
- Name defaults to the code page's name, without its path or ".js".
- If a documentation page exists matching your .js page name, it will be linked automatically, without the need for a doc parameter.
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.
Userbox
[සංස්කරණය]Want to advertise your user script development skills?
Markup | Renders as |
---|---|
{{user script developer}} |
|
{{user script developer2}} |
|
{{user scripts created}} |
|
{{user scripts created|99}} |
|