您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Hide Tesla/Elon Musk/Green Deals/EV Deals/Sponsored articles, the Featured section, and all sidebars (including the 9to5Google widget)
- // ==UserScript==
- // @name Hide Unwanted Electrek Content
- // @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.20250530151414
- // @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/"]),
- /* 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);
- })();