xerotic

Search Your Threads - Hack Forums

May 18th, 2020
503
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name            HackForums Search Your Threads
  3. // @namespace       Xerotic
  4. // @description     Adds the Search Your Threads (SYT) button to forum display pages.
  5. // @include         https://hackforums.net/forumdisplay.php*
  6. // @version         1.0.0
  7. // @grant           none
  8. // ==/UserScript==
  9.  
  10. (function() {
  11.     $('td.thead').find('div.float_right').find('strong').append(`&nbsp;&nbsp;|&nbsp;&nbsp;<form method="post" action="search.php" style="display:inline">
  12.         <input type="hidden" name="action" value="do_search">
  13.         <input type="hidden" name="matchusername" value="1">
  14.         <input type="hidden" name="forums" value="${parseInt($('div.breadcrumb').find('a').last().attr('href').split("fid=")[1])}">
  15.         <input type="hidden" name="threadprefix" value="any">
  16.         <input type="hidden" name="showresults" value="threads">
  17.         <input type="hidden" name="author" value="${$('span.welcome').find('a').text()}">
  18.         <button type="submit" class="" name="submit" title="Search Your Threads" style=" background: initial; border: initial; padding: initial; color: white; "><i class="fas fa-user-edit fa-lg"></i></button>
  19.     </form>`);
  20. })();
Add Comment
Please, Sign In to add comment