smallnetbuilder.com forum - goto first unread redirect

smallnetbuilder.com forum - goes to first unread post.

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       smallnetbuilder.com forum - goto first unread redirect
// @namespace  http://www.fmbv.nu/
// @version    0.3
// @description  smallnetbuilder.com forum - goes to first unread post.
// @match      http://www.snbforums.com/*
// @match      https://www.snbforums.com/*
// @copyright  2013, Jan Karjalainen
// @grant       none
// ==/UserScript==


(function() {

    try {

        textLink="Jump to new";

        nPage=-1;
        
	// opens 1.st such a link in tab

        for( i=0; i < document.links.length; i++ )

            if( document.links[ i ].innerHTML.match( textLink ))

		window.location.href=document.links[i].href
    }

    catch (e) {

        GM_log( 'www.snbforums.com forum - goto first unread Redirect - script exception: ' + e );
        alert ( 'www.snbforums.com - goto first unread Redirect - script exception: ' + e );

    }

}

)();