mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 15:31:52 +00:00
🎨 structure: Use more explicit naming in setBackgroundBlur()
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
function backgroundBlur() {
|
function setBackgroundBlur() {
|
||||||
const script = document.currentScript;
|
const scriptElement = document.currentScript;
|
||||||
const targetId = script && script.getAttribute("data-target-id") ? script.getAttribute("data-target-id")
|
const targetId = scriptElement && scriptElement.getAttribute("data-target-id") ? scriptElement.getAttribute("data-target-id")
|
||||||
: (console.error("data-target-id is null"), null);
|
: (console.error("data-target-id is null"), null);
|
||||||
|
|
||||||
window.addEventListener("scroll", () => {
|
window.addEventListener("scroll", () => {
|
||||||
@@ -10,4 +10,4 @@ function backgroundBlur() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
backgroundBlur();
|
setBackgroundBlur();
|
||||||
|
|||||||
Reference in New Issue
Block a user