您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
4/22/2024, 6:21:58 PM
// ==UserScript== // @name twitter.com/x.com start videos unmuted // @namespace https://gf.qytechs.cn/en/users/13300-littlepluto // @match https://twitter.com/* // @match https://x.com/* // @grant none // @noframes // @version 1.0 // @author - // @description 4/22/2024, 6:21:58 PM // ==/UserScript== document.addEventListener("play", handleEvent, { capture: true, passive: true }); function handleEvent(e) { video = e.target; isMuted = video.muted; hasPlayed = video.played.length != 0; if (isMuted && !hasPlayed) { let sibling = video.parentElement.parentElement.nextElementSibling; let grandchild = sibling.firstElementChild.firstElementChild; if (overlay = grandchild.firstElementChild) { executeMouseDown(overlay); } else { sibling.querySelector("button").click(); } } } function executeMouseDown(mouseTarget) { mouseTarget.dispatchEvent(new MouseEvent("mousedown", { bubbles: true })); mouseTarget.dispatchEvent(new MouseEvent("mouseup", { bubbles: true })); }
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址