ORES scores is injected to js configs (October 29th, 2016)
October 29th, 2016

(This post was copied from https://lists.wikimedia.org/pipermail/ai/2016-October/000112.html)


With deployment of I42300f9 [1] in wmf.23 which happened several days ago (depending on your wiki), ORES scores are injected to mediawiki javascript config variables. You can access ores data in Special:RecentChanges/Watchlist/Contributions using mw.config.get('oresData'). It opens up a whole new level of functionality for gadgets. For example, I re-wrote a huge script called ScoredRevisions [2] into several lines [3]. Also, without needing to connect to ores.wikimedia.org, it's much faster than the original gadget. You can also write scripts to sort rows in recent changes based on their ORES scores, etc. As a fun task I made my recent changes look like a rainbow :D [4] [5]

The next level is to inject ORES thresholds as mediawiki config variables so we can write up wiki-agnostic gadgets.

I would really appreciate comments or ideas :)

  1. https://gerrit.wikimedia.org/r/#/c/314449/
  2. https://github.com/he7d3r/mw-gadget-ScoredRevisions/blob/master/src/ScoredRevisions.js
  3. https://gist.github.com/Ladsgroup/e67e40500b64dd99dc7ab5c2fa34f261
  4. https://phabricator.wikimedia.org/T144922#2736504
  5. https://phab.wmfusercontent.org/file/data/hoibxop7mn4s2cooz4lz/PHID-FILE-w7bg5zw6a323zug7e6mj/pasted_file


Written by Halfak on Jun 3 2017, 5:18 PM.
Principal Research Scientist