small fixes to mediacrush embedding
This commit is contained in:
parent
1ddca2a236
commit
abf8459325
@ -317,13 +317,13 @@ Linkify =
|
|||||||
el
|
el
|
||||||
,
|
,
|
||||||
key: 'MediaCrush'
|
key: 'MediaCrush'
|
||||||
regExp: /.*(?:mediacru.sh\/)([0-9a-z_]+)/i
|
regExp: /.*(?:mediacru.sh\/)([0-9a-z_-]+)/i
|
||||||
style: 'border: 0;'
|
style: 'border: 0;'
|
||||||
el: (a) ->
|
el: (a) ->
|
||||||
el = $.el 'div'
|
el = $.el 'div'
|
||||||
$.cache "https://mediacru.sh/#{a.dataset.uid}.json", ->
|
$.cache "https://mediacru.sh/#{a.dataset.uid}.json", ->
|
||||||
{status} = @
|
{status} = @
|
||||||
return div.textContent = "ERROR #{status}" unless status in [200, 304]
|
return el.textContent = "ERROR #{status}" unless status in [200, 304]
|
||||||
{files} = @response
|
{files} = @response
|
||||||
for type in ['video/mp4', 'video/ogv', 'image/svg+xml', 'image/png', 'image/gif', 'image/jpeg', 'image/svg', 'audio/mpeg']
|
for type in ['video/mp4', 'video/ogv', 'image/svg+xml', 'image/png', 'image/gif', 'image/jpeg', 'image/svg', 'audio/mpeg']
|
||||||
for file in files
|
for file in files
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user