Added code to choose which extensions run in a browser environment

Good old whitespace remover also had something to say in this commit.