Wikimedia

Create a Javascript script to add an entry on a list present on a wikipage

You'll have to create a Javascript form for the French Wikipedia community. It will be used to add a new entry to the list of tweets. You have to know JS, and you can work without knowledge of French language.

The tweets list contains tweets, some are still added manually by contributors. They are in Proposition tweet templates, delimited by {{ and }}. See this sample.

List of constraints :

  • enable it only in _Projet:Aide_etaccueil/Twitter/Tweets page (User:YourUsername/Tweets for your tests) on view actions
  • add an add tweet link in each sections of the page (this script can help)
  • when the link is clicked, show a javascript form using OOJS library (this proff-of-concept script can help, this snippet and the index of the doc) that contain the two fields and a submit button: texte, the content of the tweet and média, a picture name to be added in the tweet
  • when the form is submitted, save the section, not all the page, that contains the old content + the added template
  • when the edit is done, show a successful message (this script and mw.notify function can help)

Here is what is the content that'll be added :

{{Proposition tweet
|texte={texte field}
|média={média field}
|proposé par=~~~~
|validé par=
|publié par=
}}

Task tags

  • twitter
  • javascript

Students who completed this task

Yifei He

Task type

  • code Code
  • web Design
close

2017