Skip to content

Commit

Permalink
Fix list blocker
Browse files Browse the repository at this point in the history
  • Loading branch information
dmstern committed Oct 12, 2020
1 parent 9b6f6f1 commit 19b516f
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/LikersBlocker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,18 @@ export default class LikersBlocker {
return this.likesCount > settings.LIKERS_LIMIT;
}

private get isTweetPage(): boolean {
private get isListPage(): boolean {
return location.href.includes("status");
}

private get isTweetPage(): boolean {
return (
location.href.includes("list") &&
(location.href.endsWith("members") ||
location.href.endsWith("subscribers"))
);
}

private get limitMessage() {
if (this.isBlockPage) {
return `${browser.i18n.getMessage(
Expand Down Expand Up @@ -614,7 +622,8 @@ export default class LikersBlocker {
return;
}

var shouldDisplayOnThisPage = this.isBlockPage || this.isTweetPage;
var shouldDisplayOnThisPage =
this.isBlockPage || this.isTweetPage || this.isListPage;

if (!shouldDisplayOnThisPage) {
return;
Expand Down

0 comments on commit 19b516f

Please sign in to comment.