修复安全和请求策略问题

This commit is contained in:
CN-JS-HuiBai
2026-04-14 16:56:46 +08:00
parent 5e9dac6197
commit 44843475c8
4 changed files with 110 additions and 30 deletions

View File

@@ -248,9 +248,16 @@
function init() {
try {
console.log('[Init] Start...');
// Clear existing intervals to prevent duplication on re-init
if (backgroundIntervals && backgroundIntervals.length > 0) {
backgroundIntervals.forEach(clearInterval);
}
backgroundIntervals = [];
// Resource Gauges Time
updateGaugesTime();
setInterval(updateGaugesTime, 1000);
backgroundIntervals.push(setInterval(updateGaugesTime, 1000));
// Initial footer year
if (dom.copyrightYear) {