Spam Thread check

Spam link check

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