Update extension.js

This might have broken something, not sure tho.