Chaturbate Auto Refresh

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==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);

    });
});