您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Try and automatically enable english captions after page loads
// ==UserScript== // @name Dropout Caption Enabler // @namespace http://tampermonkey.net/ // @license MIT // @version 0.1 // @description Try and automatically enable english captions after page loads // @author l4sgc // @match https://embed.vhx.tv/* // @icon https://www.google.com/s2/favicons?sz=64&domain=dropout.tv // @grant none // ==/UserScript== (function() { 'use strict'; var clickEvent = new MouseEvent('click', { bubbles: true, cancelable: true, view: window }); function cc() { try { let query = Array.from(document.querySelectorAll('span')).filter(e => e.textContent.toLowerCase().includes('english')); //console.log('cc', query); if (query.length === 1) query[0].dispatchEvent(clickEvent); else setTimeout(cc, 500); } catch (x) { console.log(x); } } setTimeout(cc, 500); })();