HF View Last Post on 'Your Posts'

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

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

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

    })
}