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