Fix greasemonkey compatibility and slightly refactor how the config gets set for greasemonkey