Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name HackForums Search Your Threads
- // @namespace Xerotic
- // @description Adds the Search Your Threads (SYT) button to forum display pages.
- // @include https://hackforums.net/forumdisplay.php*
- // @version 1.0.0
- // @grant none
- // ==/UserScript==
- (function() {
- var fid = parseInt($('div.breadcrumb').find('a').last().attr('href').split("fid=")[1]);
- var username = $('span.welcome').find('a').text();
- var newHTML = ` | <form method="post" action="search.php" style="display:inline">
- <input type="hidden" name="action" value="do_search">
- <input type="hidden" name="matchusername" value="1">
- <input type="hidden" name="forums" value="${fid}">
- <input type="hidden" name="threadprefix" value="any">
- <input type="hidden" name="showresults" value="threads">
- <input type="hidden" name="author" value="${username}">
- <button type="submit" class="button" name="submit" title="Search Your Threads"><strong>SYT</strong></button>
- </form>`;
- $('td.thead').find('div.float_right').find('strong').append(newHTML);
- })();
Add Comment
Please, Sign In to add comment