diff --git a/seasonals.js b/seasonals.js index b443f13..3a65c97 100644 --- a/seasonals.js +++ b/seasonals.js @@ -74,7 +74,7 @@ function loadThemeCSS(cssPath) { console.error(`Failed to load CSS: ${cssPath}`); }; - document.head.appendChild(link); + document.body.appendChild(link); console.log(`CSS file "${cssPath}" loaded.`); } @@ -104,6 +104,12 @@ function updateThemeContainer(containerClass) { console.log(`Seasonals-Container class updated to "${containerClass}".`); } +function removeSelf() { + const script = document.currentScript; + if (script) script.parentNode.removeChild(script); + console.log('External script removed:', script.src); +} + // initialize theme function initializeTheme() { let currentTheme; @@ -127,6 +133,8 @@ function initializeTheme() { if (theme.js) loadThemeJS(theme.js); console.log(`Theme "${currentTheme}" loaded.`); + + removeSelf(); }