Activate Dark Mode

Activate dark mode using the context menu.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name        Activate Dark Mode
// @description Activate dark mode using the context menu.
// @author      Schimon Jehudah, Adv.
// @namespace   i2p.schimon.dimmer-context-menu
// @homepageURL https://greasyfork.org/en/scripts/524718-activate-dark-mode
// @supportURL  https://greasyfork.org/en/scripts/524718-activate-dark-mode/feedback
// @copyright   2025, Schimon Jehudah (http://schimon.i2p)
// @license     MIT; https://opensource.org/licenses/MIT
// @icon        data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj48dGV4dCB5PSIuOWVtIiBmb250LXNpemU9IjkwIj7wn5SFPC90ZXh0Pjwvc3ZnPgo=
// @match       *://*/*
// @exclude     devtools://*
// @version     25.01.24
// @require     https://unpkg.com/[email protected]/darkreader.js
// @noframes
// @run-at      context-menu
// @grant       GM.getValue
// @grant       GM.setValue
// ==/UserScript==

(async function () {
  DarkReader.setFetchMethod(window.fetch); // https://eligrey.com/
  DarkReader.enable({brightness: 100, contrast: 90, sepia: 10});
})();

// toggle mode
/*
(async function toggle() {
  if (await GM.getValue('dimmer')) {
    await GM.setValue('dimmer', false);
    // Disable
    DarkReader.disable({brightness: 100, contrast: 90, sepia: 10});
  } else {
    await GM.setValue('dimmer', true);
    // Enable
    DarkReader.setFetchMethod(window.fetch); // https://eligrey.com/
    DarkReader.enable({brightness: 100, contrast: 90, sepia: 10});
  }
})();
*/