Project summary
User scripts are programs written in JavaScript for use on Wikimedia projects by users. User scripts enable the Wikimedia user account to do many things that they otherwise couldn't. Like changing DOM, appending HTML snippets in DOM, and changing Interface according to browsers events etc. The project is about to create a guided adventure tour on MediaWiki and MetaWiki(?) to give users insight on “How to create userscript on Wikimedia projects”. The adventure will be designed like The Wikipedia Adventure”[0] which will have 3-4 missions.
- Mission 1: Basic Intro
- Mission 2: Using MediaWiki’s JS module
- Mission 3: Using MediaWiki API
- Mission 4: Using OOUI (Optional)
Of course, MediaWIki has already good documentation on user script[1] but it is not interactive. The project primarily focuses on newbie developers and existing Wikimedia community members who have little bit knowledge about JavaScript. One of the main benefits of guided tours will be If someone does outreach then every participant should go in one and the same flow (Unlike documentation where anyone starts from the section of page).
Mentor(s)
#indic-mediawiki-developers will mentor this project.
- @Jayprakash12345
- @KCVelaga
- @APerson - also known as Enterprisey
Skill required
- HTML
- CSS
- JavaScript
- jQuery
Resources
[0] https://en.wikipedia.org/wiki/Wikipedia:The_Wikipedia_Adventure
[1] https://www.mediawiki.org/wiki/User_script
[2] https://commons.wikimedia.org/wiki/File:Userscript_and_Gadgets_workshop_toolkit.pdf
Micro tasks
Task 1
- Install MediaWiki
- Install the GuidedTour extension to MediaWiki ( you also need to install EventStreamConfig and EventLogging as GuidedTour depends on them)
- Create a mini tour with any two steps.
- Make sure your code follows Coding conventions/JavaScript
- Put the tour code in your MediaWiki's wiki page under your User namespace (Like User:ABC/tour.js)
Task 2
- Create a basic user script that use OOUI in JavaScript. Be creative and make sure it does not use more than 6 widgets.
- Make sure your code follows Coding conventions/JavaScript
- Put the tour code in your MediaWiki's wiki page under your User namespace (Like User:ABC/OOUI-Demo.js)
Task 3
- Create a basic JavaScript program that makes an interesting query using the MediaWiki API.
- Try to do something more interesting than getting the text of a page. For example, try getting the items in a category or finding the username of the most recent editor of a page, or something even more complicated.
- Make sure your code follows Coding conventions/JavaScript
- Put the tour code in your MediaWiki's wiki page under your User namespace (Like User:ABC/API-Demo.js)
Don't put link of your work here. Share your link in private on Zulip.