Improve blacklist of mastodon items, should fix #7

This commit is contained in:
Pieter Vander Vennet 2025-07-15 13:04:38 +02:00
parent f3d4f57d80
commit d9e4c7d198

View file

@ -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?