Youtube Auto Expand Video Description

Youtube Auto Expand Video Description! YT自动展开视频描述详细!

目前为 2024-02-08 提交的版本。查看 最新版本

// ==UserScript==
// @name         Youtube Auto Expand Video Description
// @namespace    http://tampermonkey.net/
// @version      2.0
// @description  Youtube Auto Expand Video Description! YT自动展开视频描述详细!
// @author       Martin______X
// @match        https://www.youtube.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant        none
// @license      MIT
// ==/UserScript==

let __$videoId = "";
//Async
const expandDescriptionClick = (async (expandObj) => {
    expandObj.click();
});
//Loop
const videoIdCheckDesInterval = setInterval(() => {
    let video_des = document.getElementsByClassName("watch-active-metadata style-scope ytd-watch-flexy style-scope ytd-watch-flexy")[0];
    let videoId = "";
    if (video_des) {
        videoId = video_des.getAttribute("video-id");
    }
    if (__$videoId != videoId) {
        let expandObj = video_des.querySelector("#expand");
        let collapseObj = video_des.querySelector("#collapse");
        expandDescriptionClick(expandObj);
        if (collapseObj.checkVisibility()) {
            console.warn("Description Expanded!");
            __$videoId = videoId;
        }
    }
}, 100);

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址