Skip to content

Commit 3997712

Browse files
committed
Update Mastodon
Signed-off-by: Matt Friedman <maf675@gmail.com>
1 parent 1c8b369 commit 3997712

1 file changed

Lines changed: 17 additions & 18 deletions

File tree

collection/sites/mastodon.yml

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
1-
name: "Mastodon"
2-
host: mastodon.social
3-
example: https://mastodon.social/@HackerNewsBot/100181134752056592
4-
extract: "!//(?'host'[-.\\w]+)/@(?'name'\\w+)/(?'id'\\d+)!"
5-
oembed:
6-
endpoint: https://mastodon.social/api/oembed
7-
scheme: https://mastodon.social/@{@name}/{@id}
8-
scrape:
9-
- extract:
10-
url: "!https://(?'host'[-.\\w]+)/@(?'name'\\w+)/(?'id'\\d+)!"
11-
- match: "!^(?'origin'https://[^/]+)/@\\w+@[-.\\w]+/(?'id'\\d+)!"
12-
- url: "{@origin}/api/v1/statuses/{@id}"
13-
iframe:
14-
data-s9e-livepreview-ignore-attrs: "style"
15-
onload: "let c=new MessageChannel;c.port1.onmessage=e=>this.style.height=e.data+'px';this.contentWindow.postMessage('s9e:init','*',[c.port2])"
16-
width: "550"
17-
height: "300"
18-
src: https://s9e.github.io/iframe/2/mastodon.min.html#<xsl:value-of select="@name"/><xsl:if test="@host and@host!='mastodon.social'">@<xsl:value-of select="@host"/></xsl:if>/<xsl:value-of select="@id"/>
1+
name: "Mastodon"
2+
host: mastodon.social
3+
example: https://mastodon.social/@HackerNewsBot/100181134752056592
4+
extract: "!//(?'host'[-.\\w]+)/@(?'name'\\w+)/(?'id'\\d+)!"
5+
oembed:
6+
endpoint: https://mastodon.social/api/oembed
7+
scheme: https://mastodon.social/@{@name}/{@id}
8+
scrape:
9+
- extract: "!\"url\":\"https://(?'host'[-.\\w]+)/@(?'name'\\w+)/(?'id'\\d+)\"!"
10+
- match: "!^(?'origin'https://[^/]+)/@\\w+@[-.\\w]+/(?'id'\\d+)!"
11+
- url: "{@origin}/api/v1/statuses/{@id}"
12+
iframe:
13+
data-s9e-livepreview-ignore-attrs: "style"
14+
onload: "let c=new MessageChannel;c.port1.onmessage=e=>this.style.height=e.data+'px';this.contentWindow.postMessage('s9e:init','*',[c.port2])"
15+
width: "550"
16+
height: "300"
17+
src: https://s9e.github.io/iframe/2/mastodon.min.html#<xsl:value-of select="@name"/><xsl:if test="@host and@host!='mastodon.social'">@<xsl:value-of select="@host"/></xsl:if>/<xsl:value-of select="@id"/>

0 commit comments

Comments
 (0)