mastodon detection nonsense
This commit is contained in:
parent
f2a0eeb799
commit
3cdf4dac45
@ -27,7 +27,7 @@
|
||||
},
|
||||
{
|
||||
"name": "url-fediverse",
|
||||
"version": "1.0.3"
|
||||
"version": "1.0.4"
|
||||
},
|
||||
{
|
||||
"name": "url-peertube",
|
||||
|
@ -2,7 +2,7 @@
|
||||
"main": "plugin.js",
|
||||
"name": "url-fediverse",
|
||||
"description": "URLReply Fediverse",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.4",
|
||||
"tags": ["urlreply"],
|
||||
"dependencies": ["urlreply"],
|
||||
"npmDependencies": []
|
||||
|
@ -114,12 +114,13 @@ class FediResponsePlugin extends Plugin {
|
||||
if (type === 'Pleroma') {
|
||||
pass = true;
|
||||
} else {
|
||||
const tag = body('a[href="https://joinmastodon.org/"]');
|
||||
const tag = body('a[href="https://joinmastodon.org"]');
|
||||
const initTag = body('head > script[id="initial-state"][type="application/json"]');
|
||||
if (
|
||||
tag &&
|
||||
initTag || (tag &&
|
||||
tag.text() &&
|
||||
((tag.text() as string).includes('Mastodon') ||
|
||||
(tag.text() as string).includes('About'))
|
||||
(tag.text() as string).includes('About')))
|
||||
) {
|
||||
pass = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user