fix: 将樱花特效默认状态改为关闭
修改默认状态为关闭以优化性能,减少不必要的资源消耗
This commit is contained in:
parent
57e553807d
commit
99e61e24c4
@ -1,11 +1,11 @@
|
|||||||
// 樱花特效切换按钮 - 添加到 rightside 设置区域
|
// 樱花特效切换按钮 - 添加到 rightside 设置区域
|
||||||
const SAKURA_STORAGE_KEY = 'sakura_effect_enabled';
|
const SAKURA_STORAGE_KEY = 'sakura_effect_enabled';
|
||||||
|
|
||||||
// 获取保存的状态,默认为 true(显示)
|
// 获取保存的状态,默认为 false(关闭)
|
||||||
function getSakuraState() {
|
function getSakuraState() {
|
||||||
const saved = localStorage.getItem(SAKURA_STORAGE_KEY);
|
const saved = localStorage.getItem(SAKURA_STORAGE_KEY);
|
||||||
// 如果没有保存过,默认显示
|
// 如果没有保存过,默认关闭
|
||||||
return saved === null ? true : saved === 'true';
|
return saved === null ? false : saved === 'true';
|
||||||
}
|
}
|
||||||
|
|
||||||
// 保存状态到 localStorage
|
// 保存状态到 localStorage
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user