/** * Myext WebExtension API access normalization * * Copyright (C) 2021 Wojtek Kosior * Redistribution terms are gathered in the `copyright' file. */ "use strict"; /* * This module normalizes access to WebExtension apis between * chrome-based and firefox-based browsers. */ (() => { if (typeof browser === "object") { window.browser = browser; window.is_chrome = false; window.is_mozilla = true; } else { window.browser = window.chrome; window.is_chrome = true; window.is_mozilla = false; } })();