YouTube always show Transcript

Always show the Transcript in YouTube.

目前為 2025-09-28 提交的版本,檢視 最新版本

// ==UserScript==
// @name         YouTube always show Transcript
// @description  Always show the Transcript in YouTube.
// @author       denis hebert
// @license      GNU AGPL-3.0-or-later
// @version      2025-09-28
// @match        https://*.youtube.com/watch*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @namespace https://greasyfork.org/users/962868
// ==/UserScript==
(x => {
    'use strict';
     new MutationObserver( () =>
        ( x ||= document.querySelector('[target-id="engagement-panel-searchable-transcript"]') )
        && x.visibility === "ENGAGEMENT_PANEL_VISIBILITY_HIDDEN"
        && (x.visibility = "ENGAGEMENT_PANEL_VISIBILITY_EXPANDED")
    ).observe( document.body, {childList: true, subtree: true} );
 })();