mirror of
https://gitee.com/butubb8/blowfish.git
synced 2025-12-05 14:17:50 +08:00
style(blur): rename data-target-id to data-blur-id
This commit is contained in:
@@ -3,8 +3,8 @@ window.A11yPanel = (() => {
|
||||
disableBlur: {
|
||||
default: false,
|
||||
apply: (enabled) => {
|
||||
document.querySelectorAll("script[data-target-id]").forEach((script) => {
|
||||
const targetId = script.getAttribute("data-target-id");
|
||||
document.querySelectorAll("script[data-blur-id]").forEach((script) => {
|
||||
const targetId = script.getAttribute("data-blur-id");
|
||||
const scrollDivisor = Number(script.getAttribute("data-scroll-divisor") || 300);
|
||||
if (typeof setBackgroundBlur === "function") {
|
||||
setBackgroundBlur(targetId, scrollDivisor, enabled, targetId === "menu-blur");
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
function setBackgroundBlur(targetId, scrollDivisor = 300, disableBlur = false, isMenuBlur = false) {
|
||||
if (!targetId) {
|
||||
console.error("data-target-id is null");
|
||||
console.error("data-blur-id is null");
|
||||
return;
|
||||
}
|
||||
const blurElement = document.getElementById(targetId);
|
||||
@@ -29,8 +29,8 @@ function setBackgroundBlur(targetId, scrollDivisor = 300, disableBlur = false, i
|
||||
updateBlur();
|
||||
}
|
||||
|
||||
document.querySelectorAll("script[data-target-id]").forEach((script) => {
|
||||
const targetId = script.getAttribute("data-target-id");
|
||||
document.querySelectorAll("script[data-blur-id]").forEach((script) => {
|
||||
const targetId = script.getAttribute("data-blur-id");
|
||||
const scrollDivisor = Number(script.getAttribute("data-scroll-divisor") || 300);
|
||||
const isMenuBlur = targetId === "menu-blur";
|
||||
const settings = JSON.parse(localStorage.getItem("a11ySettings") || "{}");
|
||||
|
||||
Reference in New Issue
Block a user