darkSnap/script.user.js

33 lines
1,004 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-12-01 16:30:22 -08:00
// @icon https://git.swee.codes/swee/darkSnap/raw/branch/main/DarkSnap.svg
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
2024-11-30 17:49:37 -08:00
style.innerHTML = `
2024-11-30 17:55:26 -08:00
body, .footer, .body {
2024-11-30 17:49:58 -08:00
background: #212529 !important;
color: white;
}
2024-11-30 17:55:26 -08:00
.notes, textarea, select {
background: #2D3142 !important;
}
.trapezoid {
color: #2D3142;
}
.trapezoid-footer {
color: #212529;
}
`;
2024-11-30 17:36:45 -08:00
document.head.appendChild(style);