Bitcointalk.org Autoreload

Automatically reloads the watchlist/unread posts

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         Bitcointalk.org Autoreload
// @name:de      Bitcointalk.org Autoreload
// @homepage     http://greatest.deepsurf.us/scripts/19125-bitcointalk-org-autoreload/
// @homepage     http://openuserjs.org/scripts/LsHallo/Bitcointalk.org_Autoreload
// @version      0.64
// @iconURL      https://greatest.deepsurf.us/system/screenshots/screenshots/000/003/979/thumb/logo.png?1461614733
// @description    Automatically reloads the watchlist/unread posts
// @description:de Automatischer reload der post seiten bei bitcointalk
// @author       LsHallo
// @match        https://bitcointalk.org/index.php?action=watchlist
// @match        https://bitcointalk.org/index.php?action=unreadreplies
// @namespace https://greatest.deepsurf.us/en/scripts/19125-bitcointalk-org-autoreload/
// ==/UserScript==

load();
var y, x, link;

function changeTitle(state) {
    if(state === 0) {
        document.title = x + " Unread Posts";
        document.getElementById('faviconprovider').href = 'https://greatest.deepsurf.us/system/screenshots/screenshots/000/003/979/thumb/logo.png?1461614733';
        setTimeout(function(){changeTitle(1);},2000);
    } else {
        document.title = y;
        document.getElementById('faviconprovider').href = 'https://bitcointalk.org/favicon.ico';
        setTimeout(function(){changeTitle(0);},2000);
    }
}

function load() {
    y = document.title;
    time = ~~(Math.random()*75953+105896);
    console.log("Idle time: " + ~~(time/1000) + " seconds (" + ((time/1000).toFixed(0)/60).toFixed(2)+" minutes)");
    setTimeout(function(){location.reload();},time);

    d = new Date();
    if(d.getHours() < 10) Hours = "0"+d.getHours(); else Hours = d.getHours();
    if(d.getMinutes() < 10) Minutes = "0"+d.getMinutes(); else Minutes = d.getMinutes();
    if(d.getSeconds() < 10) Seconds = "0"+d.getSeconds(); else Seconds = d.getSeconds();

    console.log("Last reload: " + Hours + ":" + Minutes + ":" + Seconds);

    x = document.getElementsByClassName("windowbg").length/3;
    if(x > 0) {
        link = document.createElement('link');
        link.type = 'image/x-icon';
        link.rel = 'shortcut icon';
        link.id = 'faviconprovider';
        link.href = 'https://greatest.deepsurf.us/system/screenshots/screenshots/000/003/979/thumb/logo.png?1461614733';
        document.getElementsByTagName('head')[0].appendChild(link);
        changeTitle(0);
    }
}