Board Thread:Lua Help/@comment-4405550-20160124224015/@comment-24473195-20160125165022

Interesting, I found a similar script by a MediaWiki developer. Although it requires python:

https://gist.github.com/atdt/5382043