When the synchronization script updates pages on the wiki, it records the respective commit from Phabricator in the edit summary. Since these links are external, MW doesn't convert them to working hyperlinks, which makes following them somewhat tedious. Keeping a separate log page on the wiki just for this reason seems like an overkill and waste of resources, when we could simply utilize JS to make those links active. The current format of the summary is [[User:username|username]] | Phabricator URL | Commit message. The proposed code converts this to [[User:username|username]]: <a href="Phabricator URL" target="_blank">Commit message</a>. We check for correct action ("history") and namespace and also parse only the history entries by JSS 9 to maximize efficiency.
- rUId26326b1c885: [[User:Iliev|Iliev]] | https://phabricator.wikimedia.
rUI99ed8bf30849: [[User:Iliev|Iliev]] | https://phabricator.wikimedia.
rUI535d40c97677: [[User:Iliev|Iliev]] | https://phabricator.wikimedia.
rUI9ae49d70c19e: Switch to JSS 9 (updating last committed)
rUI2bf521772bb3: Parse the Phabricator links in JSS 9 summaries
Run the proposed code in the JS console for these pages, replacing JSS 9 with Iliev.
Enclose the code nicely in anon func that gets called. Also, because this gets the nesting rather deep, invert the "should we run?" condition test and immediately return from the function if it isn't satisfied.