Dunkle Karte

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

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