v1.10.5: 侧边栏标题旁显示版本号(读 manifest,不写死)

This commit is contained in:
jinghui committed 2026-10-21 00:03:47 +08:00
1 parent 9c52bc4178
commit 40f335331b
4 files changed
+16 -2

No files matched your search

+4
View File
@@ -618,6 +618,10 @@ function refreshCustomVisibility() {
// ============ 初始化 ============
async function init() {
const hv = $("hdrVer");
if (hv) {
try { hv.textContent = "v" + chrome.runtime.getManifest().version; } catch (e) { hv.textContent = ""; }
}
let saved = {};
try { saved = (await chrome.storage.local.get("settings")).settings || {}; } catch (e) {}
settings = Object.assign({}, DEFAULTS, saved);