darkSnap/script.user.js

32 lines
887 B
JavaScript
Raw Normal View History

2024-11-30 17:00:33 -08:00
// ==UserScript==
// @name DarkSnap
2024-11-30 17:03:10 -08:00
// @namespace http://tampermonkey.net/
2024-11-30 17:00:33 -08:00
// @match https://snap.berkeley.edu/*
2024-11-30 17:03:10 -08:00
// @exclude *://snap.berkeley.edu/snap/*
2024-11-30 17:00:33 -08:00
// @grant none
2024-11-30 17:33:57 -08:00
// @version 4
2024-11-30 17:03:10 -08:00
// @author Swee
2024-11-30 17:38:16 -08:00
// @description Remix of https://forum.snap.berkeley.edu/t/18272
// @run-at document-body
2024-11-30 17:00:33 -08:00
// ==/UserScript==
//
2024-11-30 17:37:45 -08:00
document.documentElement.setAttribute('data-bs-theme', 'dark'); // Set dark mode via BS5.
document.documentElement.classList.add("text-white"); // Set the text color with BS5's respective class.
const style = document.createElement('style'); // In case the page doesn't use BS5
noBoostrapStyle.innerHTML = `
body {
background: #212529;
color: white;
}
.notes {
background: #2D3142 !important;
}
.trapezoid {
color: #2D3142;
}
.trapezoid-footer {
color: #212529;
}
`;
2024-11-30 17:36:45 -08:00
document.head.appendChild(style);