blob: 1d9edda991b546e1109657e836006731a12dd220 (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
/**
* Myext WebExtension API access normalization
*
* Copyright (C) 2021 Wojtek Kosior
*
* Dual-licensed under:
* - 0BSD license
* - GPLv3 or (at your option) any later version
*/
"use strict";
/*
* This module normalizes access to WebExtension apis between
* chrome-based and firefox-based browsers.
*/
(() => {
if (window.browser === undefined) {
window.browser = window.chrome;
window.is_chrome = true;
window.is_mozilla = false;
} else {
window.is_chrome = false;
window.is_mozilla = true;
}
})();
|