Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

189 linhas
2.2 KiB

  1. let blacklist = [
  2. 'anal',
  3. 'anilingus',
  4. 'anus',
  5. 'areola',
  6. 'b1tch',
  7. 'ballsack',
  8. 'bitch',
  9. 'blowjob',
  10. 'boner',
  11. 'boob',
  12. 'bukkake',
  13. 'cameltoe',
  14. 'carpetmuncher',
  15. 'chinc',
  16. 'chink',
  17. 'chode',
  18. 'clit',
  19. 'cock',
  20. 'coital',
  21. 'coon',
  22. 'cum',
  23. 'cunilingus',
  24. 'cunnilingus',
  25. 'cunt',
  26. 'dick',
  27. 'dike',
  28. 'dildo',
  29. 'dong',
  30. 'dyke',
  31. 'ejaculate',
  32. 'erection',
  33. 'fack',
  34. 'fag',
  35. 'felch',
  36. 'fellate',
  37. 'fellatio',
  38. 'feltch',
  39. 'foreskin',
  40. 'fuck',
  41. 'fuk',
  42. 'goatse',
  43. 'goldenshower',
  44. 'handjob',
  45. 'hardon',
  46. 'hitler',
  47. 'horny',
  48. 'jerkoff',
  49. 'jism',
  50. 'jiz',
  51. 'kkk',
  52. 'labia',
  53. 'lesbo',
  54. 'lezbo',
  55. 'masterbat',
  56. 'masturbat',
  57. 'menstruat',
  58. 'muff',
  59. 'nazi',
  60. 'negro',
  61. 'nigga',
  62. 'niger',
  63. 'nigger',
  64. 'nipple',
  65. 'nympho',
  66. 'oral',
  67. 'orgasm',
  68. 'orgies',
  69. 'orgy',
  70. 'pantie',
  71. 'panty',
  72. 'pedo',
  73. 'penetrat',
  74. 'penial',
  75. 'penile',
  76. 'penis',
  77. 'phalli',
  78. 'phuck',
  79. 'piss',
  80. 'pms',
  81. 'poon',
  82. 'porn',
  83. 'prostitut',
  84. 'pube',
  85. 'pubic',
  86. 'pubis',
  87. 'puss',
  88. 'pussies',
  89. 'pussy',
  90. 'puto',
  91. 'queaf',
  92. 'queef',
  93. 'queer',
  94. 'rape',
  95. 'rapist',
  96. 'rectal',
  97. 'rectum',
  98. 'rectus',
  99. 'reich',
  100. 'rimjob',
  101. 'schlong',
  102. 'scrote',
  103. 'scrotum',
  104. 'semen',
  105. 'sex',
  106. 'shit',
  107. 'skank',
  108. 'slut',
  109. 'sodomize',
  110. 'sperm',
  111. 'spunk',
  112. 'stfu',
  113. 'tampon',
  114. 'tard',
  115. 'testes',
  116. 'testicle',
  117. 'testis',
  118. 'tits',
  119. 'tramp',
  120. 'turd',
  121. 'twat',
  122. 'undies',
  123. 'urinal',
  124. 'urine',
  125. 'uterus',
  126. 'vag',
  127. 'vagina',
  128. 'viagra',
  129. 'virgin',
  130. 'vulva',
  131. 'wang',
  132. 'wank',
  133. 'weiner',
  134. 'wetback',
  135. 'whoralicious',
  136. 'whore',
  137. 'whoring',
  138. 'wigger',
  139. 'gaes',
  140. 'gaez',
  141. 'nogger'
  142. ];
  143. module.exports = {
  144. tree: {},
  145. init: function () {
  146. blacklist.forEach(c => {
  147. this.buildPath(c);
  148. });
  149. },
  150. buildPath: function (chain, node) {
  151. node = node || this.tree;
  152. const letter = chain[0];
  153. if (!node[letter])
  154. node[letter] = {};
  155. if (chain.length > 1)
  156. this.buildPath(chain.substr(1), node[letter]);
  157. },
  158. isClean: function (text, finalLevel) {
  159. text = text
  160. .toLowerCase();
  161. const tree = this.tree;
  162. let tLen = text.length;
  163. for (let i = 0; i < tLen; i++) {
  164. let node = tree;
  165. for (let j = i; j < tLen; j++) {
  166. node = node[text[j]];
  167. if (!node)
  168. break;
  169. else if (Object.keys(node).length === 0)
  170. return false;
  171. }
  172. }
  173. if (!finalLevel)
  174. return this.isClean(text.replace(/[^\w\s]|(.)(?=\1)/gi, ''), true);
  175. return true;
  176. }
  177. };