Twitch Pause Carousel

Pause home page carousel

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

You will need to install an extension such as Tampermonkey to install this script.

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         Twitch Pause Carousel
// @namespace    https://github.com/dotmick/
// @version      0.2
// @description  Pause home page carousel
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js
// @author       dotmick
// @match        *://www.twitch.tv
// @grant        none
// @license      GPL-3.0-or-later
// ==/UserScript==


// Ugly, but that works
$(document).ready(() => {
	console.log('Running Twitch Pause Carousel (TPC)');

    var checkExist = setInterval(function() {
        if ($('.video-player__container video').get(0).readyState == 4) {
            console.log("TPC – Video ready to be paused");
            clearInterval(checkExist);
            var nbPausing = 100;
            var forcePausing = setInterval(function() {
                console.log("TPC – Forcing pause...");
                $('.video-player__container video').get(0).pause();
                nbPausing--;
                if(nbPausing == 0)
                {
                    clearInterval(forcePausing);
                    console.log("TPC – Forcing pause done (x" + nbPausing + ")");
                }

            }, 100);
        }
    }, 100);
});