Add Dailymotion embedding.
This commit is contained in:
parent
a7ff93d53f
commit
60711a54e1
@ -133,7 +133,7 @@ Config =
|
|||||||
]
|
]
|
||||||
'Link Title': [
|
'Link Title': [
|
||||||
true
|
true
|
||||||
'Replace the link of a supported site with its actual title. Currently supported: YouTube, Vimeo, SoundCloud, and Github gists.'
|
'Replace the link of a supported site with its actual title. Currently supported: YouTube, Vimeo, Dailymotion, SoundCloud, and Github gists.'
|
||||||
1
|
1
|
||||||
]
|
]
|
||||||
'Embedding': [
|
'Embedding': [
|
||||||
|
|||||||
@ -173,6 +173,17 @@ Embedding =
|
|||||||
controls: true
|
controls: true
|
||||||
preload: 'auto'
|
preload: 'auto'
|
||||||
src: a.dataset.href
|
src: a.dataset.href
|
||||||
|
,
|
||||||
|
key: 'Dailymotion'
|
||||||
|
regExp: /^\w+:\/\/(?:(?:www\.)?dailymotion\.com\/(?:embed\/)?video|dai\.ly)\/([A-Za-z0-9]+).*((?:\?.*)?)/
|
||||||
|
style: 'border: none; width: 640px; height: 360px;'
|
||||||
|
el: (a) ->
|
||||||
|
options = if (start = a.dataset.options.match /[?&](start=\d+)/) then "?#{start[1]}" else ''
|
||||||
|
$.el 'iframe',
|
||||||
|
src: "//www.dailymotion.com/embed/video/#{a.dataset.uid}#{options}"
|
||||||
|
title:
|
||||||
|
api: (uid) -> "https://api.dailymotion.com/video/#{uid}"
|
||||||
|
text: (_) -> _.title
|
||||||
,
|
,
|
||||||
key: 'Gist'
|
key: 'Gist'
|
||||||
regExp: /^\w+:\/\/gist\.github\.com\/(?:[\w\-]+\/)?(\w+)/
|
regExp: /^\w+:\/\/gist\.github\.com\/(?:[\w\-]+\/)?(\w+)/
|
||||||
|
|||||||
BIN
src/Linkification/icons/dailymotion.png
Normal file
BIN
src/Linkification/icons/dailymotion.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 226 B |
Loading…
x
Reference in New Issue
Block a user