Hack Forums - Notify xadamxk with reports

Adds buttons to post to 'quick report' them; sends PM of reported post.

  1. // ==UserScript==
  2. // @name Hack Forums - Notify xadamxk with reports
  3. // @namespace Snorlax
  4. // @description Adds buttons to post to 'quick report' them; sends PM of reported post.
  5. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js
  6. // @grant GM_getValue
  7. // @grant GM_setValue
  8. // @grant GM_xmlhttpRequest
  9. // @include *hackforums.net/showthread.php*
  10. // @version 1.0
  11. // ==/UserScript==
  12.  
  13. username = "xadamxk";
  14. my_post_key = unsafeWindow.my_post_key;
  15.  
  16. $(".post_management_buttons").prepend("<a href='javascript:void(0)' class='bitButton quickReport'>S Report</a>");
  17.  
  18. $(".quickReport").on("click", function() {
  19. message = "[url=http://hackforums.net/" + encodeURIComponent($(this).parentsUntil("table[id*='post_']").parent().find("a[href*='showthread.php?tid=']").attr("href")) + "]This post needs moderation[/url]";
  20. if(confirm("Are you sure you wish to report this?") == true) {
  21. console.log("Sending PM to " + username + " with message: " + message);
  22. GM_xmlhttpRequest({
  23. method: "POST",
  24. url: "http://hackforums.net/private.php",
  25. data: "my_post_key=" + my_post_key + "&to=" + username + "&bcc=&subject=Quick%20Report&message_new=" + message + "&message=" + message + "&options%5Bsignature%5D=1&options%5Bsavecopy%5D=1&options%5Breadreceipt%5D=1&action=do_send&pmid=&do=&submit=Send+Message",
  26. headers: {
  27. "Content-Type": "application/x-www-form-urlencoded",
  28. "Referer": "http://www.hackforums.net/private.php?action=send"
  29. }
  30. });
  31. }
  32. });

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址