Spam Thread check

Spam link check

当前为 2016-01-29 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Spam Thread check
  3. // @namespace Sality
  4. // @description Spam link check
  5. // @include *kat.cr/*
  6. // @version 0.1 Beta
  7. // @grant none
  8. // ==/UserScript==
  9.  
  10.  
  11. var pathname = window.location.pathname;
  12. try{
  13. //Spam Testing script -----------------------------------------------------------------------------------------------------------------------------------------------
  14. if ($('ul#latestForum').length) {
  15. $('ul#latestForum li').each(function(){
  16. var title = $('p.latest-title',$(this)).text().trim().toLowerCase();
  17. if((title.indexOf('http://')!=-1)||(title.indexOf('www.')!=-1)||(title.indexOf('weight loss')!=-1)||(title.indexOf('gain muscle')!=-1)||(title.indexOf('brain pill')!=-1)||(title.indexOf('boost your memory')!=-1))
  18. {
  19. $('span.explanation',$(this)).after('<span style="padding:5px;background-color:#cc1212;color:#fff;" class="sality">&nbsp;X&nbsp;</span>');
  20. }
  21. else if((title.indexOf('congrats')!=-1)||(title.indexOf('adopt')!=-1)||(title.indexOf('latest')!=-1)||(title.indexOf('torrent')!=-1)||(title.indexOf('release')!=-1)||(title.indexOf('mod')!=-1)||(title.indexOf('request')!=-1))
  22. {
  23. $('span.explanation',$(this)).after('<span style="padding:5px;background-color:#00cc00;color:#fff;" class="sality">Ok</span>');
  24. }
  25. else
  26. {
  27. $('span.explanation',$(this)).after('<span style="padding:5px;background-color:#ff9900;color:#fff;" class="sality">&nbsp;#&nbsp;</span>');
  28. }
  29. });
  30. console.log("Probable Spamming Detection Done");
  31. }
  32.  
  33. //community check-------------------------------------------------------------------------------------------------------------------------------------------------------
  34. if (pathname.indexOf('\/community\/') != -1) {
  35. //if($('table.data .showBlockJS div.markeredBlock a.cellMainLink').length)
  36. $('table.data .showBlockJS tr td:nth-child(2) div.markeredBlock').each(function(){
  37. var title = $('a.cellMainLink',$(this)).text().trim().toLowerCase();
  38. if((title.indexOf('http://')!=-1)||(title.indexOf('www.')!=-1)||(title.indexOf('weight loss')!=-1)||(title.indexOf('gain muscle')!=-1)||(title.indexOf('brain pill')!=-1)||(title.indexOf('boost your memory')!=-1)||(title.indexOf('beauty')!=-1))
  39. {
  40. $('a.cellMainLink',$(this)).after('<span style="padding:5px;background-color:#cc1212;color:#fff;" class="sality">Spam</span>');
  41. }
  42. else if((title.indexOf('congrats')!=-1)||(title.indexOf('adopt')!=-1)||(title.indexOf('latest')!=-1)||(title.indexOf('torrent')!=-1)||(title.indexOf('release')!=-1)||(title.indexOf('mod')!=-1)||(title.indexOf('request')!=-1))
  43. {
  44. $('a.cellMainLink',$(this)).after('<span style="padding:5px;background-color:#00cc00;color:#fff;" class="sality"> Ok </span>');
  45. }
  46. else
  47. {
  48. $('a.cellMainLink',$(this)).after('<span style="padding:5px;background-color:#ff9900;color:#fff;" class="sality">Check</span>');
  49. }
  50. });
  51. //community page top links----------------------------------------------------------------------------------------------------------------------------------------
  52. $('table[class="data clear"] div.markeredBlock').each(function(){
  53. var title = $('a.cellMainLink',$(this)).text().trim().toLowerCase();
  54. if((title.indexOf('http://')!=-1)||(title.indexOf('www.')!=-1)||(title.indexOf('weight loss')!=-1)||(title.indexOf('gain muscle')!=-1)||(title.indexOf('brain pill')!=-1)||(title.indexOf('boost your memory')!=-1))
  55. {
  56. $('a.cellMainLink',$(this)).after('<span style="padding:5px;background-color:#cc1212;color:#fff;" class="sality">&nbsp;X&nbsp;</span>');
  57. }
  58. else if((title.indexOf('congrats')!=-1)||(title.indexOf('adopt')!=-1)||(title.indexOf('latest')!=-1)||(title.indexOf('torrent')!=-1)||(title.indexOf('release')!=-1)||(title.indexOf('mod')!=-1)||(title.indexOf('request')!=-1))
  59. {
  60. $('a.cellMainLink',$(this)).after('<span style="padding:5px;background-color:#00bb22;color:#fff;" class="sality">&nbsp; Ok &nbsp;</span>');
  61. }
  62. else
  63. {
  64. $('a.cellMainLink',$(this)).after('<span style="padding:5px;background-color:#227799;color:#fff;" class="sality">Check</span>');
  65. }
  66. });
  67. }
  68. //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  69. $('ul#latestForum li span.sality').css({"border-radius":"5px","margin-top":"-25px","margin-left":"-5px","position":"absolute"});
  70. }//try end
  71. catch(ex){
  72. Console.log("Error IN script /Page . Inform Sality");
  73. }