Skip to content

Instantly share code, notes, and snippets.

@shmick
Created March 9, 2025 17:58
Show Gist options
  • Save shmick/df4a5b4ac9bb023672a9bf25210cff99 to your computer and use it in GitHub Desktop.
Save shmick/df4a5b4ac9bb023672a9bf25210cff99 to your computer and use it in GitHub Desktop.
RFD RedFlagDeals Red Flag Deals Dark Mode
// ==UserScript==
// @name RFD Dark
// @description Dark theme for RFD / RedFlagDeals, powered by the Dark Reader API
// @include *://forums.redflagdeals.com/*
// @include *://www.redflagdeals.com/*
// @run-at document-start
// @version 1.2
// ==/UserScript==
(function() {
function injectScript(fn) {
const script = document.createElement("script");
script.textContent = `(${fn})();`;
document.documentElement.appendChild(script);
}
injectScript(() => {
// Load DarkReader dynamically
const darkReaderScript = document.createElement("script");
darkReaderScript.src = "https://cdn.jsdelivr.net/npm/[email protected]/darkreader.js";
darkReaderScript.onload = () => {
DarkReader.setFetchMethod(window.fetch);
DarkReader.enable();
setTimeout(() => {
DarkReader.enable({
brightness: 100,
contrast: 90,
sepia: 10
}, {
css: `ul.thread-meta-small {background-color: transparent;}`,
});
}, 100);
};
document.head.appendChild(darkReaderScript);
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment