Greasy Fork

Greasy Fork is available in English.

有道云笔记无广告

删除指定的广告组件 , 适用于: ✅有道云笔记网页版https://note.youdao.com/

目前为 2025-02-20 提交的版本,查看 最新版本

// ==UserScript==
// @name         有道云笔记无广告
// @namespace    noteyoudaonoad
// @homepage     https://zhengkai.blog.csdn.net/
// @version      20250222.3
// @description  删除指定的广告组件 , 适用于: ✅有道云笔记网页版https://note.youdao.com/
// @author       Moshow郑锴
// @license      MIT
// @match        https://note.youdao.com/web/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // 删除所有匹配选择器的 ad-component 元素
    document.querySelectorAll('#flexible-list-left > div:nth-child(2) > div > ad-component').forEach(function(element) {
        element.remove();
        console.log("删除所有匹配选择器的 ad-component 元素");
    });

    // 查找匹配选择器的元素并移除 adListTag class
    document.querySelectorAll('#file-outer').forEach(function(element) {
        element.classList.remove('adListTag');
        console.log("查找匹配选择器的元素并移除 adListTag class");
    });
})();