Move FirefoxCom and window.addEventListener('message') out of api.js