From d9e4c7d198779834153430ffcb47529deb94bd20 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 15 Jul 2025 13:04:38 +0200 Subject: [PATCH] Improve blacklist of mastodon items, should fix #7 --- src/Mastodon.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mastodon.ts b/src/Mastodon.ts index cf98713..755725e 100644 --- a/src/Mastodon.ts +++ b/src/Mastodon.ts @@ -186,14 +186,14 @@ ${text.split("\n").map(txt => " > " + txt).join("\n")}`) return overview.length + rest.join("\n").length + 1 } - private static notMastodon = ["wiki.openstreetmap.org", "hdyc.neis-one.org", "matrix.to","facebook.com"] + private static notMastodon = ["wiki.openstreetmap.org", "hdyc.neis-one.org", "matrix.to","facebook.com","github", "tasks.hotosm.org","community.openstreetmap.org","mapillary.com","wikimedia.org","wikipedia.org","wikidata.org"] private static isMastodon = ["en.osm.town", ".social", "mstdn", "mastodon", "mapstodon","masto"] static isProbablyMastodonLink(link: string) { if (this.isMastodon.some(white => link.indexOf(white) >= 0)) { return true } - if (!this.notMastodon.some(white => link.indexOf(white) >= 0)) { + if (this.notMastodon.some(black => link.indexOf(black) >= 0)) { return false } return true; // probably?