diff --git a/src/app/bad-words.js b/src/app/bad-words.js index 8e48b01..322069f 100644 --- a/src/app/bad-words.js +++ b/src/app/bad-words.js @@ -1,4 +1,4 @@ -let XXX_BLOCK_WORDS = ['incestcash', 'asacp', 'xondemand', 'yankscash', 'klixxx', 'cybersitter', 'safesurf', +const XXX_BLOCK_WORDS = ['incestcash', 'asacp', 'xondemand', 'yankscash', 'klixxx', 'cybersitter', 'safesurf', 'surfwatch', 'netcash', 'watersport', 'fuck', 'threesome', 'tits', 'masturbating', 'incest', 'bestiality', 'analintercourse', 'analsex', 'animesex', 'anitablonde', 'autosex', 'blackass', 'blackasses', 'boner', 'boobcruise', @@ -244,9 +244,16 @@ let XXX_BLOCK_WORDS = ['incestcash', 'asacp', 'xondemand', 'yankscash', 'klixxx' 'sleeping', 'speculums', 'spread', 'spreading', 'squirting', 'stripper', 'stripping', 'swapping', 'thong', 'topless', 'toying', 'trix', 'undressing', 'uniform', 'whipcream', 'brazzers', 'порно', -'порн', 'лесб', 'гей', 'геи', 'прон', 'catgoddess', 'gracel', 'fatman', 'falko', 'pthc', -'ptsc', 'yukikax', 'ls-models', '3yo', '4yo', '5yo', '6yo', '7yo', '8yo', '9yo', -'10yo', '11yo', '12yo', '13yo', '14yo', '15yo', '16yo' +'порн', 'лесб', 'гей', 'геи', 'прон' ]; -module.exports = XXX_BLOCK_WORDS; +const XXX_VERY_BAD_WORDS = [ + 'catgoddess', 'gracel', 'fatman', 'falko', 'pthc', + 'ptsc', 'yukikax', 'ls-models', '3yo', '4yo', '5yo', '6yo', '7yo', '8yo', '9yo', + '10yo', '11yo', '12yo', '13yo', '14yo', '15yo', '16yo' +] + +module.exports = { + XXX_BLOCK_WORDS, + XXX_VERY_BAD_WORDS +}; diff --git a/src/app/content.js b/src/app/content.js index a62906c..c3eb6e2 100644 --- a/src/app/content.js +++ b/src/app/content.js @@ -234,16 +234,22 @@ const ExtesionBase = { const ContentTypeProp = 'contentType'; const ContentCategoryProp = 'contentCategory'; -const XXX_BLOCK_WORDS = require('./bad-words'); +const { + XXX_BLOCK_WORDS, + XXX_VERY_BAD_WORDS +} = require('./bad-words'); // блокируем порнографию const blockBadName = (torrent, name) => { let splitName = name.split(/[`~!@#$%^&*()\]\[{}.,+?/\\;:\-_' "|]/); splitName.some((word) => { + if (XXX_VERY_BAD_WORDS.some(function(v) { return word == v; })) { + torrent[ContentTypeProp] = 'bad'; + } else if (XXX_BLOCK_WORDS.some(function(v) { return word == v; })) { torrent[ContentCategoryProp] = 'xxx'; } - return torrent[ContentCategoryProp] == 'xxx'; + return torrent[ContentCategoryProp] == 'xxx' || torrent[ContentTypeProp] == 'bad'; }) } @@ -266,7 +272,7 @@ const detectSubCategory = (torrent, files, typesPriority, contentType) => { blockBadName(torrent, fileCheck); if(torrent[ContentCategoryProp] == 'xxx') { - console.log('block because file ' + path); + console.log('marked torrent xxx because file ' + path); } return torrent[ContentCategoryProp] == 'xxx'; }) diff --git a/src/background/spider.js b/src/background/spider.js index 89b7b36..d6c0bb4 100644 --- a/src/background/spider.js +++ b/src/background/spider.js @@ -387,6 +387,12 @@ const checkTorrent = (torrent) => { } } + if(torrent.contentType === 'bad') + { + console.log('ignore torrent', torrent.name, 'because this is a bad thing') + return false + } + return true }