porting additional-extensions.py to js (not done yet)