playground hustler with sound

makes beep when theres more than one player in paid room. usefull if you're alone in lowroll so you can go on another tab while waiting.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name        playground hustler with sound
// @namespace   namespace
// @description makes beep when theres more than one player in paid room. usefull if you're alone in lowroll so you can go on another tab while waiting.
// @include     http://chopcoin.io/*
// @version     1.1111
// @grant       none
// ==/UserScript==


var playOnce = true;
checkPlayers();

function checkPlayers() {
    var players = chopcoin.game.leaderboard.list.length;
    var pot = chopcoin.game.pot;
    if (players > 1 && playOnce && pot != 0) {
        //alert('multiple players');
        document.head.innerHTML += "<video controls=\"\" id=\"beep\" autoplay=\"\" name=\"media\" style=\"display:none;\"><source src=\"http://www.freesfx.co.uk/rx2/mp3s/7/8494_1353333227.mp3\" type=\"audio/mpeg\" /></video>";
        playOnce = false;
        console.log('multiple players');
    }
    else if (players <= 1) {
        playOnce = true;
        beepElement = document.getElementById('beep');
        if (beepElement) beep.parentElement.removeChild(beep);
        console.log('player reset');
    }
    setTimeout(function(){ checkPlayers(); }, 200);
}