Sleazy Fork is available in English.

18P2P_autothanks

18P2P自动感谢

  1. // ==UserScript==
  2. // @name 18P2P_autothanks
  3. // @description 18P2P自动感谢
  4. // @include http://111.92.236.50/*
  5. // @include http://18p2p.com/*
  6. // @include http://*.18p2p.com/*
  7. // @author congxz6688
  8. // @version 2015.8.13.0
  9. // @namespace https://greasyfork.org/scripts/165
  10. // ==/UserScript==
  11.  
  12. if(window.location.href.indexOf("forumdisplay.php")!=-1){
  13. var fid=window.location.href.split("fid=")[1].match(/\d+/)[0];
  14. function playthanks(e){
  15. theAnchor=e.target;
  16. var formhash=document.querySelector('[name="formhash"]').value;
  17. var wwe=theAnchor.href;
  18. var tid=wwe.split("tid=")[1].match(/\d+/)[0];
  19. var urll=wwe.match(/htt.*?(?=(viewthread|redirect))/)[0] + "thankyou.php?fid=" + fid +"&tid="+tid+ "&thankyousubmit=1&formhash="+formhash+"&reason=Thanks";
  20. GM_xmlhttpRequest({
  21. method: 'POST',
  22. synchronous:true,
  23. url: urll,
  24. onload: function(){
  25. GM_log("自动感谢 ok!");
  26. window.location=wwe;
  27. }
  28. })
  29. }
  30. var allTabLink=document.querySelectorAll('[href*="viewthread.php"],[href*="redirect.php"]');
  31. for (sd=0;sd<allTabLink.length;sd++){
  32. allTabLink[sd].addEventListener("click",playthanks,false);
  33. allTabLink[sd].innerHTML = allTabLink[sd].innerHTML.replace(/<.*?>/g,"")
  34. }
  35. }