修改b站合集展示框高度

修改b站合集展示框高度,顺带去除部分广告

// ==UserScript==
// @name         修改b站合集展示框高度
// @namespace    http://tampermonkey.net/
// @version      2025-04-17
// @description  修改b站合集展示框高度,顺带去除部分广告
// @author       freeAbrams
// @match        https://www.bilibili.com/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    // Your code here...
    function waitForElement(selector, callback) {
        const element = document.querySelector(selector);
        if (element) {
            callback(element);
        } else {
            setTimeout(() => waitForElement(selector, callback), 500);
        }
    }

    waitForElement('.video-pod__body', (el) => {
        el.style.height = '800px';
    });
    waitForElement('.video-pod__body', (el) => {
        el.style.maxHeight = 'none';
    });
    waitForElement('#slide_ad', (el) => {
        el.style.display = 'none';
    });
    waitForElement('.video-card-ad-small', (el) => {
        el.style.display = 'none';
    });

})();