Find All posts in PostActivity

posts in PostActivity

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         Find All posts in PostActivity
// @namespace    http://saadtronics.com/
// @version      1.4
// @description      posts in PostActivity
// @author       Saad Tronics (King of Hearts, saadtronics)
// @match        http://www.hackforums.net/postactivity.php*
// @match        http://hackforums.net/postactivity.php*
// @require      http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js
// @grant        none
// ==/UserScript==

$(document).ready(function(){
    
    var username = $('#content > div.navigation > span > a').html();
    
    console.log('hello');
    var navBit = document.getElementsByClassName('navigation')[0];          
    var postkey = ($('[name="my_post_key"]').val());
    var table=document.querySelector("div.quick_keys table");
    var x = table.rows[1].insertCell(1);
    x.innerHTML = "Find all threads";
    x.className="tcat";
    var x = table.rows[1].insertCell(2);
    x.innerHTML = "Find all posts";
    x.className="tcat";

    for(var i = 2; i < table.rows.length; i++){
        var x = table.rows[i].insertCell(1);
        var forumId = table.rows[i].cells[0].innerHTML.match(/fid=(.*)">/)[1];
        var form = '<form action="search.php" method="post"><input type="hidden" name="action" value="do_search"> <input type="hidden" name="keywords" value=""> <input type="hidden" name="postthread" value="2"> <input type="hidden" name="author" value="'+username+'"> <input type="hidden" name="matchusername" value="1"> <input type="hidden" name="forums[]" value="'+forumId+'"> <input type="hidden" name="findthreadst" value="1"> <input type="hidden" name="numreplies" value=""> <input type="hidden" name="postdate" value="0"> <input type="hidden" name="pddir" value="1"> <input type="hidden" name="threadprefix" value="any"> <input type="hidden" name="sortby" value="lastpost"> <input type="hidden" name="sortordr" value="desc"> <input type="hidden" name="showresults" value="threads"> <input type="submit" name="submit" value="Find All Threads"></form>';
        x.innerHTML = form;
        x.className="tcat";

        var z = table.rows[i].insertCell(2);
        var form = '<form action="search.php" method="post"><input type="hidden" name="action" value="do_search"> <input type="hidden" name="keywords" value=""> <input type="hidden" name="postthread" value="1"> <input type="hidden" name="author" value="'+username+'"> <input type="hidden" name="matchusername" value="1"> <input type="hidden" name="forums[]" value="'+forumId+'"> <input type="hidden" name="findthreadst" value="1"> <input type="hidden" name="numreplies" value=""> <input type="hidden" name="postdate" value="0"> <input type="hidden" name="pddir" value="1"> <input type="hidden" name="threadprefix" value="any"> <input type="hidden" name="sortby" value="lastpost"> <input type="hidden" name="sortordr" value="desc"> <input type="hidden" name="showresults" value="posts"> <input type="submit" name="submit" value="Find All Posts"></form>';
        z.innerHTML = form;
        z.className="tcat";

    }

});