Added code to choose which extensions run in a browser environment

Good old whitespace remover also had something to say in this commit.
Revert all these changes to the license block