Update script.user.js

This commit is contained in:
Nova Cat 2024-11-30 17:29:53 -08:00
parent 6646b16eb3
commit 56548b4403

View file

@ -17,6 +17,7 @@ if (document.querySelectorAll('[data-bs-theme]').length > 0) {
// bootstrap 5, and this is how you make bootstrap go in dark mode
document.documentElement.setAttribute('data-bs-theme', 'dark');
document.documentElement.classList.add("text-white"); // Make the text white with a class, rather than custom CSS.
console.info("This page uses BS5.")
} else {
// Dark mode patches for non-bootstrap pages
const noBoostrapStyle = document.createElement('style');
@ -36,5 +37,6 @@ if (document.querySelectorAll('[data-bs-theme]').length > 0) {
}
`;
document.head.appendChild(noBoostrapStyle);
console.info("This page does NOT use BS5.")
}
document.head.appendChild(style);