From 8626f1f2d9aafa997a15d8834608504a68cc648d Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Sun, 6 Jun 2021 13:15:10 +0300 Subject: [PATCH] Update db.js --- scripts/db.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/db.js b/scripts/db.js index 75cf792ff..58ee0dacb 100644 --- a/scripts/db.js +++ b/scripts/db.js @@ -83,6 +83,11 @@ db.channels = { }) } + if (!this.nsfw) { + output = output.filter(channel => !channel.isNSFW()) + } + + this.nsfw = true this.duplicates = true this.filter = null @@ -93,6 +98,11 @@ db.channels = { return this }, + removeNSFW() { + this.nsfw = false + + return this + }, all() { return this.list },