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 wizardDone , see AutotranslateHelper — 0x010C ~talk~ 09:40, 4 April 2017 (UTC)
- 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
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: 2018-16[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 later this week
- Profiling statistics for an abuse filter tell how often edits match the filter. The statistics for the abuse filters were reset after 10000 actions. Wikis can now decide to reset it more or less often. They can file a phabricator task to do so. [1]
Abuse filters will now treat integers and floats more precisely. For example, 5/2 was rounded down to 2 but will now be 2.5 and 2*4 will be the integer 8 and not the floating-point number 8.0. Division values are the only ones changed. For the rest only strict comparisons (
===
and!==
) will be affected leaving the values unchanged. [2][3]The new version of MediaWiki will be on test wikis and MediaWiki.org from 17 April. It will be on non-Wikipedia wikis and some Wikipedias from 18 April. It will be on all wikis from 19 April (calendar).
Meetings
You can join the next meeting with the Editing team. During the meeting, you can tell developers which bugs you think are the most important. The meeting will be on 17 April at 18:30 (UTC). See how to join.
You can join the technical advice meeting on IRC. During the meeting, volunteer developers can ask for advice. The meeting will be on 18 April at 15:00 (UTC). See how to join.
Future changes
- The new PDF renderer could not create PDFs from books. Books are in this case collections of pages on a Wikimedia wiki. PediaPress will take over development of the books-to-PDF function. [4]
Pywikibot will no longer support Python 2.7.2 and 2.7.3. [5]
Volunteer developers can fill out the Wikimedia Communities and Contributors survey. The last day is April 22 (UTC). This is a third-party service survey. See the privacy statement.
Tech news prepared by Tech News writers and posted by bot • Contribute • Translate • Get help • Give feedback • Subscribe or unsubscribe.
15:20, 16 April 2018 (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]
- Commons:User scripts/reports
- 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