From 7fa6b32d13a3537ccd3775a6b0537f876d9b764e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Andreas=20Nilsen?= Date: Fri, 3 Oct 2025 09:37:14 +0200 Subject: [PATCH] fixed login page styling --- modern-bas.user.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/modern-bas.user.js b/modern-bas.user.js index 47410b5..8b51ff9 100644 --- a/modern-bas.user.js +++ b/modern-bas.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name BAS - Modern Style Toggle // @namespace https://git.ntnu.no/M365-Drift/MonkeyMagic -// @version 1.0.10 +// @version 1.0.13 // @description Apply modern styling to BAS/Cereweb with toggle between modern and classic // @author Øyvind Nilsen (on@ntnu.no) // @match https://bas.ntnu.no/* @@ -39,10 +39,9 @@ function applyModernStyle() { if (!modernStyleElement) { - if (document.getElementById('login')) { const loginCssContent = GM_getResourceText('modernLoginCSS'); - GM_addStyle(loginCssContent); + modernStyleElement = GM_addStyle(loginCssContent); console.log('✅ Modern BAS Login CSS applied'); } else { const cssContent = GM_getResourceText('modernCSS'); @@ -140,10 +139,6 @@ } function initializeStyles() { - // Load the modern CSS resource - const cssContent = GM_getResourceText('modernCSS'); - modernStyleElement = GM_addStyle(cssContent); - // Apply the appropriate style based on saved preference if (isModernMode) { applyModernStyle();