remove difficult

remove difficult Problems

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

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.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

// ==UserScript==
// @name         remove difficult
// @name:zh-CN   移除困难的
// @namespace    mailto: [email protected]
// @version      0.0.11
// @license      MIT
// @description  remove difficult Problems
// @description:zh-CN 移除困难的 Leetcode 题目
// @author       1405056768
// @match        https://leetcode.cn/problemset/*
// @match        https://leetcode.cn/tag/*
// @match        https://leetcode.cn/problem-list/*
// @match        https://leetcode.com/problemset/*
// @match        https://leetcode.com/problem-list/*
// @match        https://leetcode.cn/search/?q=*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=leetcode.cn
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    main();
})();

function main() {
    setInterval(remove, 3000);
}

function remove() {
    // 查找所有包含特定 span 的元素
const spans = document.querySelectorAll('span.text-red-s');

// 遍历每个找到的 span
spans.forEach(span => {
    // 获取 span 的父节点
    const parentNode = span.parentNode;
    // 获取父节点的父节点
    const grandParentNode = parentNode.parentNode;
    // 隐藏父节点的父节点
    grandParentNode.style.display = 'none';
});
}