Skip to content

Commit

Permalink
working on bas styling
Browse files Browse the repository at this point in the history
  • Loading branch information
on committed Oct 3, 2025
1 parent 83ec9c5 commit 1e3c6aa
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions modern-bas.user.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// ==UserScript==
// @name BAS - Modern Style Toggle
// @namespace https://git.ntnu.no/M365-Drift/MonkeyMagic
// @version 1.0.9
// @version 1.0.10
// @description Apply modern styling to BAS/Cereweb with toggle between modern and classic
// @author Øyvind Nilsen (on@ntnu.no)
// @match https://bas.ntnu.no/*
// @exclude https://bas.ntnu.no/groupadmin/*
// @exclude https://bas.ntnu.no/userclient/*
// @exclude https://bas.ntnu.no/login
// @resource modernCSS https://raw.git.ntnu.no/M365-Drift/MonkeyMagic/main/modern-bas.css
// @resource modernLoginCSS https://raw.git.ntnu.no/M365-Drift/MonkeyMagic/main/modern-bas-login.css
// @grant GM_addStyle
// @grant GM_getResourceText
// @grant GM_setValue
Expand Down Expand Up @@ -42,6 +42,12 @@
const cssContent = GM_getResourceText('modernCSS');
modernStyleElement = GM_addStyle(cssContent);
console.log('✅ Modern BAS CSS applied');

if (document.getElementById('login')) {
const loginCssContent = GM_getResourceText('modernLoginCSS');
GM_addStyle(loginCssContent);
console.log('✅ Modern BAS Login CSS applied');
}
}

// Enable modern style
Expand All @@ -54,7 +60,7 @@
/*if (link.href.includes('/css/style.css') ||
link.href.includes('yui') ||
link.href.includes('default.css')) {*/
if (link.href.includes('/css/style.css') || link.href.includes('border_tabs')) {
if (link.href.includes('/css/style.css') || link.href.includes('border_tabs') || link.href.includes('/css/login.css')) {
link.disabled = true;
}
});
Expand Down Expand Up @@ -92,7 +98,7 @@
/*if (link.href.includes('/css/style.css') ||
link.href.includes('yui') ||
link.href.includes('default.css')) {*/
if (link.href.includes('/css/style.css') || link.href.includes('border_tabs')) {
if (link.href.includes('/css/style.css') || link.href.includes('border_tabs') || link.href.includes('/css/login.css')) {
link.disabled = false;
}
});
Expand Down

0 comments on commit 1e3c6aa

Please sign in to comment.