HF View Last Post on 'Your Posts'

Add a View Last Post link to the 'Your Posts' page.

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

You will need to install an extension such as Tampermonkey to install this 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        HF View Last Post on 'Your Posts'
// @description Add a View Last Post link to the 'Your Posts' page. 
// @include     *hackforums.net/search.php*
// @require     http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js
// @version     1
// @namespace https://greasyfork.org/users/24272
// ==/UserScript==
var pageText = $('body').html().toString();

var foundText = pageText.indexOf("Last Post");

if (foundText == -1) {
    $(".trow1 a[href*='showthread.php?tid=']").each(function(e) {
        uid = $(this).attr("href");




        if (uid.indexOf('pid') > -1) {} else {

            $(this).after("<a href=" + uid + "&action=lastpost><b><u>View Last Post</u></b></a>");
            $(this).after(" || ");
        }

    })

    $(".trow2 a[href*='showthread.php?tid=']").each(function(e) {
        uid = $(this).attr("href");

        if (uid.indexOf('pid') > -1) {} else {

            $(this).after("<a href=" + uid + "&action=lastpost><b><u>View Last Post</u></b></a>");
            $(this).after(" || ");
        }

    })
}