eBay Dark Mode

A dark mode look for eBay

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name        eBay Dark Mode
// @namespace   ebay-dark-mode
// @description A dark mode look for eBay
// @author      DeviousD4n
// @version     0.2
// @license     MIT
// @include     https://*.ebay.*/*
// @match       https://itm.ebaydesc.com/*
// @run-at      document-start
// @grant       none
// ==/UserScript==

const style = document.createElement("style");

if (location.hostname === "itm.ebaydesc.com") {

    style.textContent = `
        img, picture, video, canvas, image,
        *[style*="background-image"] {
            filter: invert(1) hue-rotate(180deg) saturate(1.12) contrast(1.05) !important;
        }
    `;
} else {

    style.textContent = `
        html {
            filter: invert(1) hue-rotate(180deg) saturate(1.12) contrast(1.05) !important;
        }

        img, picture, video, canvas, image, .gh-logo {
            filter: invert(1) hue-rotate(180deg) !important;
        }

        html, body,
        .srp-river,
        #mainContent {
            background-color: rgb(235,235,235) !important;
        }

        .vim,
        .ux-navigator__container,
        .seo-interlink {
            background: transparent !important;
        }
    `;
}

document.documentElement.appendChild(style);