Enable more general Twitter image embedding
You can get Twitter images in different sizes by appending a
size (":thumb", ":large", ":orig", etc.) to the URL. Those weren't
embeddable yet, because they no longer look like ordinary image URLs.
This makes them embeddable.
This commit is contained in:
parent
ed01e4ca5f
commit
6f93a1fb6a
@ -419,6 +419,12 @@ Embedding =
|
|||||||
cont
|
cont
|
||||||
else
|
else
|
||||||
el
|
el
|
||||||
|
,
|
||||||
|
key: 'TwitterImage'
|
||||||
|
regExp: /^\w+:\/\/pbs\.twimg\.com\/media\/([\w-]{15}\.(?:gif|png|jpg):\w+)/i
|
||||||
|
style: ''
|
||||||
|
el: (a) ->
|
||||||
|
$.el 'div', <%= html('<a target="_blank" href="https://pbs.twimg.com/media/${a.dataset.uid}"><img src="https://pbs.twimg.com/media/${a.dataset.uid}" style="max-width: 80vw; max-height: 80vh;"></a>') %>
|
||||||
,
|
,
|
||||||
key: 'VidLii'
|
key: 'VidLii'
|
||||||
regExp: /^\w+:\/\/(?:www\.)?vidlii\.com\/watch\?v=(\w{11})/
|
regExp: /^\w+:\/\/(?:www\.)?vidlii\.com\/watch\?v=(\w{11})/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user