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