Refactor eurovision.js and eurovision.css: remove commented code for clarity
This commit is contained in:
@@ -13,7 +13,6 @@
|
||||
.music-note-wrapper {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
/* initial top will be set via JS */
|
||||
opacity: 0;
|
||||
animation: move-right linear infinite;
|
||||
will-change: transform, opacity;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// 1. Read Configuration
|
||||
const config = window.SeasonalsPluginConfig?.Eurovision || {};
|
||||
|
||||
const enabled = config.EnableEurovision !== undefined ? config.EnableEurovision : true;
|
||||
@@ -10,7 +9,7 @@ const glowSize = config.EurovisionGlowSize !== undefined ? config.EurovisionGlow
|
||||
|
||||
let msgPrinted = false;
|
||||
|
||||
// 2. Toggle Function
|
||||
// Toggle Function
|
||||
function toggleEurovision() {
|
||||
const container = document.querySelector('.eurovision-container');
|
||||
if (!container) return;
|
||||
@@ -35,7 +34,6 @@ function toggleEurovision() {
|
||||
}
|
||||
}
|
||||
|
||||
// 3. MutationObserver
|
||||
const observer = new MutationObserver(toggleEurovision);
|
||||
observer.observe(document.body, {
|
||||
childList: true,
|
||||
@@ -43,7 +41,6 @@ observer.observe(document.body, {
|
||||
attributes: true
|
||||
});
|
||||
|
||||
// 4. Element Creation
|
||||
function createElements() {
|
||||
const container = document.querySelector('.eurovision-container') || document.createElement('div');
|
||||
|
||||
@@ -95,7 +92,6 @@ function createElements() {
|
||||
}
|
||||
}
|
||||
|
||||
// 5. Initialization
|
||||
function initializeEurovision() {
|
||||
if (!enabled) return;
|
||||
createElements();
|
||||
|
||||
Reference in New Issue
Block a user