Skip to content

Commit

Permalink
fixed login page styling
Browse files Browse the repository at this point in the history
  • Loading branch information
on committed Oct 3, 2025
1 parent b6f5895 commit 7fa6b32
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions modern-bas.user.js
Original file line number Diff line number Diff line change
@@ -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/*
Expand Down Expand Up @@ -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');
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 7fa6b32

Please sign in to comment.