34 lines
No EOL
1 KiB
JavaScript
34 lines
No EOL
1 KiB
JavaScript
/*jshint esversion: 6 */
|
|
// ==UserScript==
|
|
// @name DarkSnap
|
|
// @namespace http://tampermonkey.net/
|
|
// @match https://snap.berkeley.edu/*
|
|
// @exclude *://snap.berkeley.edu/snap/*
|
|
// @icon https://git.swee.codes/swee/darkSnap/raw/branch/main/DarkSnap.svg
|
|
// @grant none
|
|
// @version 5
|
|
// @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, textarea, select {
|
|
background: #2D3142 !important;
|
|
}
|
|
.trapezoid {
|
|
color: #2D3142;
|
|
}
|
|
.trapezoid-footer {
|
|
color: #212529;
|
|
}
|
|
`;
|
|
document.head.appendChild(style); |