@@ -27,7 +27,7 @@ const blocklist = new Set(require('./blocklist.json'));
27
27
* In addition to the blocklist, any account slug matching this regex will not
28
28
* be displayed on the website.
29
29
*/
30
- const BLOCKED_STRINGS = / (?: [ c k ] a [ s z ] i n o | s e o | s l o t s | g a m b l (?: e | i n g ) | c r y p t o ) / i;
30
+ const BLOCKED_STRINGS = / (?: [ c k ] a [ s z ] i n o | s e o | s l o t | g a m b l (?: e | i n g ) | c r y p t o | f o l l o w | b u y | c h e a p | i n s t a g r a m | h a c k s | t i k t o k | l i k e s | y o u t u b e | s u b s c r i b e r | b o o s t | d e p o s i t | m u s h r o o m | b i n g o | b r o k e r | p r o m o t i o n | b a t h r o o m | l a n d s c a p i n g | l a w n c a r e | g r o u n d s k e e p i n g | r e m e d i a t i o n | e s p o r t s | l i n k s | c o u p o n | r e v i e w | r e f e r | p r o m o c o d e | r a b a t t k o d | j ä m f ö r | b e t t i n g | r e d d i t | h i r e | f o r t u n e | e q u i t y | d o w n l o a d | m a r k e t i n g | c o m m e n t | r a n k | s c r a p c a r | l a w y e r | c e l e b | c o n c r e t e | f i r e s t i c k | p l a y g r o u n d ) / i;
31
31
32
32
/**
33
33
* Add a few Categories exposed by Open Collective to help moderation
@@ -38,7 +38,8 @@ const BLOCKED_CATEGORIES = [
38
38
'credit' ,
39
39
'gambling' ,
40
40
'seo' ,
41
- 'writer'
41
+ 'writer' ,
42
+ 'review'
42
43
] ;
43
44
44
45
/**
@@ -160,10 +161,21 @@ const getAllOrders = async (slug = 'mochajs') => {
160
161
}
161
162
} ;
162
163
163
- const isAllowed = ( { slug, categories} ) =>
164
- ! blocklist . has ( slug ) &&
165
- ! BLOCKED_STRINGS . test ( slug ) &&
166
- ! categories . some ( category => BLOCKED_CATEGORIES . includes ( category ) ) ;
164
+ const isAllowed = ( { name, slug, website, categories} ) => {
165
+ const allowed = ! blocklist . has ( slug ) &&
166
+ ! BLOCKED_STRINGS . test ( name ) &&
167
+ ! BLOCKED_STRINGS . test ( slug ) &&
168
+ ! BLOCKED_STRINGS . test ( website ) &&
169
+ ! categories . some ( category => BLOCKED_CATEGORIES . includes ( category ) ) ;
170
+
171
+ if ( ! allowed ) {
172
+ debug ( 'filtering %o' , { categories, name, slug, website} ) ;
173
+ } else {
174
+ // debug('keeping %o', {categories, name, slug, website}, BLOCKED_STRINGS.test(website));
175
+ }
176
+
177
+ return allowed ;
178
+ } ;
167
179
168
180
const getSupporters = async ( ) => {
169
181
const orders = await getAllOrders ( ) ;
0 commit comments