GOG.com - Updated Thread Count in Title

Display a count of updated threads in the GOG forum list page title and icon and reload once an hour so a pinned tab can be used as an update notifier

Versione datata 27/08/2014. Vedi la nuova versione l'ultima versione.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name        GOG.com - Updated Thread Count in Title
// @namespace   ssokolow.com
// @description Display a count of updated threads in the GOG forum list page title and icon and reload once an hour so a pinned tab can be used as an update notifier
// @contributionURL http://tinyurl.com/kfgayrh
// @match     *://www.gog.com/forum
// @require   http://cdnjs.cloudflare.com/ajax/libs/tinycon/0.5/tinycon.min.js

// @version     3
// @grant       none
// ==/UserScript==

var unviewed_faves = $(".topics .text:contains('My favourite topics')").parents('h2').next('.category').find('.item:not(.visited) .name a');

Tinycon.setOptions({
    width: 7,
    height: 9,
    font: '10px arial',
    colour: '#ffffff',
    background: '#9CC824',
    fallback: false
});
Tinycon.setBubble(unviewed_faves.length);
$('title').text($('title').text() + ' (' + unviewed_faves.length + ')');

setTimeout(function() { window.location.reload(true); }, 3600 * 1000);