I would suggest enclosing all of this code in preprocessor tags, using `#if GENERIC || CHROME`, since it's not necessary in Firefox.