Greasy Fork is available in English.

Dunkle Karte

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

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

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