您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
Dynamically moves the subtitles so that they’re not covered by the progress bar
// ==UserScript== // @name Disney+: Move subtitles up when controls are showing // @namespace Violentmonkey Scripts // @match https://www.disneyplus.com/video/* // @grant none // @version 1.0 // @author Lypheo // @description Dynamically moves the subtitles so that they’re not covered by the progress bar // @license MIT // ==/UserScript== function waitForElm(selector) { return new Promise(resolve => { if (document.querySelector(selector)) { return resolve(document.querySelector(selector)); } const observer = new MutationObserver(mutations => { if (document.querySelector(selector)) { resolve(document.querySelector(selector)); observer.disconnect(); } }); observer.observe(document.body, { childList: true, subtree: true }); }); } (async function() { let controls = await waitForElm(".overlay.overlay__controls"); observer = new MutationObserver(function (event) { showing = !!document.querySelector(".overlay.overlay__controls.overlay__controls--visually-show"); document.querySelector(".dss-hls-subtitle-overlay").style.top = showing ? "-80px" : "0px"; }); observer.observe(controls, { attributes: true, attributeFilter: ['class'], childList: false, characterData: false }); })();