Improve blacklist of mastodon items, should fix #7
This commit is contained in:
parent
f3d4f57d80
commit
d9e4c7d198
1 changed files with 2 additions and 2 deletions
|
@ -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?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue