Parse the Phabricator links in JSS 9 summaries

Authored by kerberizer on Nov 8 2018, 12:30 AM.


Parse the Phabricator links in JSS 9 summaries

Summary: 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.

Test Plan:
Run the proposed code in the JS console for these pages, replacing JSS 9 with Iliev.

Reviewers: Borislav

Reviewed By: Borislav

Tags: JS/CSS User Interface, Phabricator maintenance

Differential Revision: https://phabricator.wikimedia.bg/D5