2Posit

Watch playposit videos at 1.5x, 2x, or 10x speed!

スクリプトをインストールするには、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         2Posit
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Watch playposit videos at 1.5x, 2x, or 10x speed!
// @author       reesericci
// @match        https://api.playposit.com/player_v2/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=playposit.com
// @grant        none
// @license      GPL-v3.0-or-later
// ==/UserScript==



function waitForElm(selector) {
    return new Promise(resolve => {
        if (document.querySelector(selector)) {
            return resolve(document.querySelector(selector));
        }

        const observer = new MutationObserver(mutations => {
            if (document.querySelector(selector)) {
                resolve(document.querySelector(selector));
                observer.disconnect();
            }
        });

        observer.observe(document.body, {
            childList: true,
            subtree: true
        });
    });
}


(async function() {
    'use strict';

    await waitForElm("#playback-speed-select-all");

    let oneFiveOption = document.createElement("option")
    oneFiveOption.value = 1.5;
    oneFiveOption.text = "1.5x Speed"

    let twoOption = document.createElement("option")
    twoOption.value = 2;
    twoOption.text = "2x Speed"

    let tenOption = document.createElement("option")
    tenOption.value = 10;
    tenOption.text = "10x Speed"

    document.getElementById("playback-speed-select-all").add(oneFiveOption)
    document.getElementById("playback-speed-select-all").add(twoOption)
    document.getElementById("playback-speed-select-all").add(tenOption)
})();