feat: add cross-browser browser.*/chrome.* shim; exclude test/ from builds
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
'use strict';
|
||||
// Cross-browser API namespace. Firefox provides Promise-based `browser.*`;
|
||||
// Chrome MV3 exposes `browser.*` too, but some builds only populate the
|
||||
// `chrome.*` global. Alias to whichever is present.
|
||||
if (typeof browser === 'undefined' || browser == null) {
|
||||
var browser = (typeof chrome !== 'undefined' ? chrome : {});
|
||||
}
|
||||
|
||||
function errMsg(err) {
|
||||
return String((err && err.message) || err);
|
||||
|
||||
Reference in New Issue
Block a user