Chaturbate Auto Refresh

Refreshes Chatubate profiles to check if the user if online, useful when streams drop.

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Chaturbate Auto Refresh
// @namespace    https://tesomayn.com
// @version      1.0
// @description  Refreshes Chatubate profiles to check if the user if online, useful when streams drop.
// @author       TesoMayn
// @match        https://chaturbate.com/*
// @match        http://chaturbate.com/*
// @grant        none
// ==/UserScript==

$(document).ready( function() {
    var checkTime = 5; // This is all you need to change, to time in seconds
    
    /* No need to change below this, unless you know what you are doing */
    if ($('#defchat > p:contains("Room is currently offline")').length > 0) {
        setInterval(function(){
            window.location.reload(1);
        },checkTime*1000);
        $('#defchat p').append('<p class="recheckCountown">Rechecking in <b id="check-time">'+ checkTime +'</b> seconds</p>');
    }
    var settimmer = 0;
    $(function(){
        window.setInterval(function() {
            var timeCounter = $("b#check-time").html();
            var updateTime = eval(timeCounter)- eval(1);
            $("b#check-time").html(updateTime);
        }, 1000);

    });
});