Dunkle Karte

Night mode für die Karte. Macht die Karte dunkel, sobald der Dunkelmodus im Spiel aktiv ist.

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.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

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        Dunkle Karte
// @namespace   leeSalami.lss
// @version     1.0
// @license     MIT
// @author      leeSalami
// @description Night mode für die Karte. Macht die Karte dunkel, sobald der Dunkelmodus im Spiel aktiv ist.
// @match       https://*.leitstellenspiel.de
// @icon        https://www.google.com/s2/favicons?sz=64&domain=leitstellenspiel.de
// @run-at      document-start
// ==/UserScript==

(() => {
  'use strict';

  const style = document.createElement('style');
  style.innerHTML = `
    body.dark .leaflet-layer,
    body.dark .leaflet-control-layers,
    body.dark .leaflet-control-custom,
    body.dark .leaflet-control-zoom-in,
    body.dark .leaflet-control-zoom-out,
    body.dark .leaflet-control-attribution {
      filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
    }

    body.dark .leaflet-control-layers,
    body.dark .leaflet-control-custom {
      border: 2px solid rgba(255,255,255,0.2) !important;
    }
    
    body.dark .leaflet-tooltip {
      background-color: #0d0d0d;
      color: #ddd !important;
      border: #0d0d0d !important;
    }

    body.dark .leaflet-tooltip.leaflet-tooltip-left::before {
      border-left-color: #0d0d0d;
    }
    
    body.dark .leaflet-tooltip.leaflet-tooltip-right::before {
      border-right-color: #0d0d0d;
    }
    
    body.dark .leaflet-container {
      background-color: #0d0d0d !important;
    }
    
    body.dark .leaflet-container a {
      color: #464646;
    }
  `;

  document.head.appendChild(style);
})();