Commons:User scripts
Hi, interested in scripting? We need help, so do not hesitate to ask what you can do. We recommend start testing in your user-namespace (new users see basic instructions here).
We have a JavaScript styleguide, but it is a guide, not a policy. Nevertheless, consider reading the MediaWiki manual.
Contents
TO DO[edit]
- Clarify the copyright situation of user-scripts.
- standardize scripts' i18n methods → Gadgets 2.0 (mw.msg; example; explanation)
- Search & Detecting security vulnerable
- (urgent) Fix script affected by changes in the default continuation
To create[edit]
These are just suggestions. Feel free to comment in the talk-section.
- A script to get a formatted list of uploads, category-members, …
- A plugin to install scripts loaded with &withJS= - URL parameter to the user's common or skin.js
- A script-installer which is invokable by a template (URL-params maybe) with a step-by-step wizard (done for gadgets → Template:ActivateGadget)
- A global-user-page and settings wizard allowing to create and update the userpage on several wikis.
- A slideshow-framework using templates and script like Image Annotator or {{ImageStack}} with customizable caption-boxes, slide-effects, drag&slide, preview thumb-bar, …
- Integrate code for VIC and FPC nomination in MediaWiki:Gadget-QInominator.js.
- An autotranslate-template creation wizard
- Refractor MediaWiki:Gadget-LanguageSelect.js: Multiple language-preferences, showing a (+) like HotCat allowing to add a translation (create an input on-the-fly) to push i18n forward
- Script to show 1-3 file examples in parent categories from their child categories (Special:Permalink/84246834#Galleries in Categories)
- Rewrite DerivativeFX as a JavaScript application
- A tool to visually explore Flickr-Images from streams/sets/… before uploading and allowing to unselect some of them by given criteria
-
A script to allow admins to close undeletion requests like closing deletion requests with MediaWiki:Gadget-DelReqHandler.js (maybe inside delreqhandler)Done here by Perhelion and Steinsplitter
Scripts without il8n[edit]
Other[edit]
- MediaWiki:Gadget-ChooseResolution.js, MediaWiki:Gadget-dictionaryLookupHover.js not installed as a gadget
- MediaWiki:Gadget-Tag.js - ? not installed
Under construction[edit]
- Improve: Gallery-like mass-changing script User:Rillke/AjaxMassDelete.js
- Improve: Gallery of uploads MediaWiki:JSONListUploads.js
- Improve: licensereviewer.js (switch to API, ease the process)
- Waiting for clearance: Common SVG Checker MediaWiki:CommonsSvgChecker.js and Commons:Commons SVG Checker as UI
General Talk[edit]
→ /talk
Tech News: 2015-51[edit]
Latest tech news from the Wikimedia technical community. Please tell other users about these changes. Not all changes will affect you. Translations are available.
Changes this week
- Meta will be able to use information from Wikidata. [1]
- The new version of MediaWiki will be on test wikis and MediaWiki.org from 15 December. It will be on non-Wikipedia wikis and some Wikipedias from 16 December. It will be on all Wikipedias from 17 December. (calendar).
Meetings
- You can join the next meeting with the VisualEditor team. During the meeting, you can tell developers which bugs you think are the most important. The meeting will be on 15 December at 19:00 (UTC). See how to join.
- You can join the next meeting with the Architecture committee. The topic this week is talking about the agenda for the Wikimedia Developer Summit. The meeting will be on 16 December at 22:00 (UTC). See how to join. [2]
Future changes
- A new gadget manager will come next year. The new gadget system is called Gadgets 2.0. [3]
Tech news prepared by tech ambassadors and posted by bot • Contribute • Translate • Get help • Give feedback • Subscribe or unsubscribe.
17:42, 14 December 2015 (UTC)
Tech News: 2016-33[edit]
Latest tech news from the Wikimedia technical community. Please tell other users about these changes. Not all changes will affect you. Translations are available.
Problems
- Last week Tech News announced you will get a notification when you mention yourself the same way as if someone else had mentioned you. This caused some problems and will happen later instead. [4]
- Creating and editing links to sections on other pages on the wiki now works again in the visual editor. [5]
- For some users, cross-wiki notifications haven't been working properly. The count has been wrong when only cross-wiki notifications were present. The cross-wiki bundle has been showing only the names of wikis and not the actual notifications. This will be fixed soon. [6][7]
Changes this week
- The login session when you choose "Keep me logged in" will now last a year. Previously it was 30 days. This will happen on August 16. [8]
- Some abuse filters will have to be updated during the week. This is because a bug will be fixed. [9]
- In compact language links, two new kinds of languages will be shown in the shorter language list: Languages that are used in the article's text, and languages where the article has a badge like "featured article" or "good article". [10][11]
- The visual editor will be available by default for logged-out editors on Wikipedias that use the Arabic script. It is already default for logged-in editors. [12]
- The new version of MediaWiki will be on test wikis and MediaWiki.org from August 16. It will be on non-Wikipedia wikis and some Wikipedias from August 17. It will be on all wikis from August 18 (calendar).
Meetings
- You can join the next meeting with the VisualEditor team. During the meeting, you can tell developers which bugs you think are the most important. The meeting will be on August 16 at 19:00 (UTC). See how to join.
Future changes
- Starting the week of August 22 there will be three software deployment windows. They will be at 13:00, 18:00, and 23:00 UTC. This is to have more times when software of the wikis can be updated and make it easier for developers in different parts of the world. [13]
Tech news prepared by tech ambassadors and posted by bot • Contribute • Translate • Get help • Give feedback • Subscribe or unsubscribe.
19:37, 15 August 2016 (UTC)
Users with script experience that may help[edit]
{{User script developer}} |
- User: DieBuche (maybe inactive)
- User: Dschwen
- User: Helder
- User: Ilmari Karonen
- User: Krinkle
- User: Lupo
- User: Magnus Manske
- User: Rillke
See also: Category:Commons JavaScript coders
See also[edit]
Learning[edit]
- Wikibooks (de, en)
- mw:ResourceLoader/Default modules
- jQuery – code less, do more
- Usability drafts by Guillaume Paumier
Testing[edit]
You can test any script by running it from your console or put the code in a Special:MyPage/test.js and hit "preview".
- jsfiddle.net – Edit css, JavaScript, HTML and run it (big sandbox)
- Testing with different IE versions (Windows) (IETester: For slow machines) (Expression Web SuperPreview: For mordern machines)
- &withJS functionality: Commons has per-page JavaScript functionality, via this code being included in MediaWiki:Common.js. Try a random imagefile with MediaWiki:VisualFileChange.js.
- Testing the API
Validating and styling[edit]
- Use MediaWiki:Gadgetprototype.js for new gadgets.
- jslint – JavaScript Code Quality Tool
- jshint – another JavaScript Code Quality Tool
- jsbeautifier – Indenting and formatting your script – also on Commons:
- Commons Beautifier: escape unsafe characters and beautify the source code
- compactor- or just search yourself
Tools[edit]
Troubleshooting[edit]
- Commons Diagnostic: Let affected users make the test
- &debug=true – URL parameter to get un-minified code
- Debug AJAX requests (using mockjax) github doc