MediaWiki talk:ProfileTags.js

Script needs review and more testing
I think this script was deployed a bit too quickly.

1. It is sending out console.log output, for no good reason. This should really be tested out in a sandbox. 2. It isn't always retrieving the latest revision due to the caching and use of the wrong API. 3. You might want to use versions to make it easier to discern what is working or not, and also so that people don't get puzzled by wrong documentation relating to a previous version.

A suggestion to solve problem 2 is an api call that does retrieve the latest version :

mw.loader.using('mediawiki.api', function {            (new mw.Api)                .get({ titles: "MediaWiki:ProfileTags", "prop":"revisions", "rvprop":"content", indexpageids: '' }).done(function (data) { var id = data.query.pageids[0] console.log(data.query.pages[id].revisions[0]["*"]) });       });