您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Pause stream/video in the channel and video-list page
当前为
// ==UserScript== // @name Twitch pause autoplay // @namespace https://github.com/etshy // @icon https://www.twitch.tv/favicon.ico // @version 1.0.3 // @description Pause stream/video in the channel and video-list page // @author Etshy // @exclude https://www.twitch.tv/videos/* // @match https://www.twitch.tv/* // @supportURL https://gist.github.com/etshy/325d00b7487cae4ad45569f4f6b1bdb8 // @grant none // @license MIT // ==/UserScript== /* jshint esversion:6 */ window.onload = function() { let interval = setInterval(function(){ let liveVideo = document.querySelector('.channel-root--live') let liveVideoHome = document.querySelector('.channel-root--home') if (liveVideo && (!liveVideoHome || liveVideoHome === null)) { //we are on live page video let videoPlayer = document.querySelector('video') if (videoPlayer.paused) { videoPlayer.play() } return; } if (!window.location.href.startsWith('https://www.twitch.tv/videos/') || (liveVideoHome && liveVideoHome !== null)) { let videoPlayer = document.querySelector('video') if (videoPlayer.paused === false) { videoUrlLoaded = videoPlayer.src videoPlayer.pause(); } } if (window.location.href.startsWith('https://www.twitch.tv/videos/')) { let videoPlayer = document.querySelector('video') if (videoPlayer.paused) { videoPlayer.play() } } }, 100); };
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址