Skip to content

Commit

Permalink
filteReddit: fix some custom filters (#3195)
Browse files Browse the repository at this point in the history
* filteReddit: fix typo `this` -> `thing` (filtering by postType: 'self')

* filteReddit: fix "is NSFW" custom filter
  • Loading branch information
erikdesjardins committed Jul 24, 2016
1 parent fc38698 commit 29a0f24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/modules/filteReddit.js
Expand Up @@ -505,7 +505,7 @@ module.options = {
switch (data.kind) {
case 'comment': return thing.isComment();
case 'link': return thing.isSelfPost();
case 'self': return this.isLinkPost();
case 'self': return thing.isLinkPost();
default: throw new Error(`unknown post type "${data.kind}"`);
}
},
Expand Down Expand Up @@ -631,7 +631,7 @@ module.options = {
'post is marked NSFW',
],
evaluate(thing) {
return thing.classList.contains('over18');
return thing.isNSFW();
},
},
loggedInAs: {
Expand Down

0 comments on commit 29a0f24

Please sign in to comment.