Bug 922540 - rewrite build/additional-extensions.py in javascript