Activate Dark Mode

Activate dark mode using the context menu.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==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});
  }
})();
*/