darkSnap/script.user.js
2024-11-30 17:53:35 -08:00

32 lines
No EOL
904 B
JavaScript

// ==UserScript==
// @name DarkSnap
// @namespace http://tampermonkey.net/
// @match https://snap.berkeley.edu/*
// @exclude *://snap.berkeley.edu/snap/*
// @grant none
// @version 4
// @author Swee
// @description Remix of https://forum.snap.berkeley.edu/t/18272
// @run-at document-body
// ==/UserScript==
//
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
style.innerHTML = `
body, .footer, .body {
background: #212529 !important;
color: white;
}
.notes {
background: #2D3142 !important;
}
.trapezoid {
color: #2D3142;
}
.trapezoid-footer {
color: #212529;
}
`;
document.head.appendChild(style);