Update script.user.js
This commit is contained in:
parent
6646b16eb3
commit
56548b4403
1 changed files with 2 additions and 0 deletions
|
@ -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
|
// bootstrap 5, and this is how you make bootstrap go in dark mode
|
||||||
document.documentElement.setAttribute('data-bs-theme', 'dark');
|
document.documentElement.setAttribute('data-bs-theme', 'dark');
|
||||||
document.documentElement.classList.add("text-white"); // Make the text white with a class, rather than custom CSS.
|
document.documentElement.classList.add("text-white"); // Make the text white with a class, rather than custom CSS.
|
||||||
|
console.info("This page uses BS5.")
|
||||||
} else {
|
} else {
|
||||||
// Dark mode patches for non-bootstrap pages
|
// Dark mode patches for non-bootstrap pages
|
||||||
const noBoostrapStyle = document.createElement('style');
|
const noBoostrapStyle = document.createElement('style');
|
||||||
|
@ -36,5 +37,6 @@ if (document.querySelectorAll('[data-bs-theme]').length > 0) {
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
document.head.appendChild(noBoostrapStyle);
|
document.head.appendChild(noBoostrapStyle);
|
||||||
|
console.info("This page does NOT use BS5.")
|
||||||
}
|
}
|
||||||
document.head.appendChild(style);
|
document.head.appendChild(style);
|
Loading…
Reference in a new issue