您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Remove all "[inhales]", "[loud noise]" and similar subtitle parts.
当前为
// ==UserScript== // @name Netflix [subtitle] filter // @namespace Violentmonkey Scripts // @match https://www.netflix.com/* // @grant none // @version 1.0 // @author Einar Lielmanis, [email protected] // @description Remove all "[inhales]", "[loud noise]" and similar subtitle parts. // ==/UserScript== let observed_node = undefined const on_mutated = (changes) => { const ts = observed_node.querySelectorAll('.player-timedtext-text-container span') for (let i = 0; i < ts.length; i++) { const t = ts[i].innerHTML if (t.includes('[') && t.includes(']')) { const nt = t.replace(/\[[^\]]+\]/g, '') // "[" .. (not "]")+ .. "]" ts[i].innerHTML = nt console.log({ original: t, filtered: nt }) } } } const observer = new MutationObserver(on_mutated) const reobserve = () => { const elems = document.getElementsByClassName('player-timedtext') if (elems[0] !== undefined) { if (observed_node !== elems[0]) { observed_node = elems[0] console.log({ observed_node }) observer.observe(observed_node, { childList: true, subtree: true}) } } window.setTimeout(reobserve, 1000) } console.log('Netflix subtitle filter userscript starting up') reobserve()
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址