feat: add cross-browser browser.*/chrome.* shim; exclude test/ from builds

This commit is contained in:
2026-08-19 02:48:15 +08:00
parent b571953f10
commit 9edaa687a5
4 changed files with 18 additions and 2 deletions
+5
View File
@@ -1,5 +1,10 @@
'use strict';
// Cross-browser API namespace (see background.js). No-op in Firefox.
if (typeof browser === 'undefined' || browser == null) {
var browser = (typeof chrome !== 'undefined' ? chrome : {});
}
const $ = (sel) => document.querySelector(sel);
const MASTER_KEY = 'enabled';