Neg a fucker

Neg a fucker r

当前为 2015-08-09 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Neg a fucker
  3. // @namespace Hash G.
  4. // @description Neg a fucker r
  5. // @include *hackforums.net*
  6. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js
  7. // @version 1.0
  8. // @grant GM_getValue
  9. // @grant GM_setValue
  10. // @grant GM_deleteValue
  11. // ==/UserScript==
  12.  
  13. $(".menu > ul:nth-child(1) > li:nth-child(1)").after('<li><a class="navButton" onClick="autoNeg()" style="color: #4C9ED9;">Neg a fucker</a></li>');
  14.  
  15. var uidarr = [];
  16. $("#boardstats_e > tr:nth-child(2) > td:nth-child(1) > span:nth-child(1)").find("a").each(function(index) {
  17. var href = $(this).attr("href");
  18. uidarr[index] = href.substring(56);
  19. });
  20. var uid = uidarr[Math.floor(Math.random() * uidarr.length)];
  21.  
  22. if (document.URL.indexOf("hguscript") !== -1) {
  23. $("#reputation").val(-3);
  24. $(".textbox").val("Meow dislike you.");
  25. }
  26.  
  27. function autoNeg() {
  28. javascript:void window.open('http://www.hackforums.net/reputation.php?action=add&uid='+uid+'&pid=0&ref=hguscript','1438968873972','width=500,height=300,toolbar=0,menubar=0,location=0,status=1,scrollbars=1,resizable=1,left=0,top=0');
  29. }
  30. exportFunction(autoNeg, unsafeWindow, {defineAs: "autoNeg"});