Electrek css

Hide Tesla/Elon Musk/Green Deals/EV Deals/Sponsored articles, the Featured section, and all sidebars (including the 9to5Google widget)

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला 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         Electrek css
// @description  Hide Tesla/Elon Musk/Green Deals/EV Deals/Sponsored articles, the Featured section, and all sidebars (including the 9to5Google widget)
// @match        https://electrek.co/*
// @version 0.0.1.20251109111818
// @namespace https://greasyfork.org/users/1435046
// ==/UserScript==

(function () {
    const style = document.createElement('style');
    style.textContent = `
        /* Hide articles tagged Tesla, Elon Musk, Green Deals, EV Deals, or Sponsored Post */
        article.article:has(ul.article__meta-guides a[href*="/tesla/"]),
        article.article:has(ul.article__meta-guides a[href*="/elon-musk/"]),
        article.article:has(ul.article__meta-guides a[href*="/green-deals/"]),
        article.article:has(ul.article__meta-guides a[href*="/ev-deals/"]),
        article.article:has(ul.article__meta-guides a[href*="/quick-charge/"]),
        article.article:has(ul.article__meta-guides a[href*="/sponsored-post/"]),
        article.article:has(ul.article__meta-guides a[href*="/guides/electrek-podcast/"]),
        article.article:has(ul.article__meta-guides a[href*="/guides/podcast/"]),
        article.article:has(ul.article__meta-guides a[href*="/guides/wheel-e-podcast/"]),
        article.article:has(ul.article__meta-guides a[href*="/guides/opinion/"]),
        article.article:has(ul.article__meta-guides a[href*="/guides/review/"]),
        article.article:has(ul.article__meta-guides a[href*="/guides/ev-lease/"]),
        article.article:has(ul.article__meta-guides a[href*="/guides/survey-sunday/"]),

        /* Hide articles by sponsored post authors */
        article.article:has(.author__link a[href*="/author/sponsoredpostz/"]),

        /* Hide the Featured carousel section */
        div.container.xs:has(> h2[attr-title="Featured"]),
        /* Hide any sidebar region */
        aside.sidebar,
        /* Hide the branded-RSS widget (e.g. 9to5Google) */
        .widget.ninetofive-branded-rss {
            display: none !important;
        }
        `;
    document.head.appendChild(style);
})();