Run on clones as well.

This commit is contained in:
noface 2016-11-27 01:52:12 +01:00
parent cae1df14e3
commit 2293ea3393

View File

@ -22,13 +22,19 @@ Embedding =
return
events: (post) ->
return unless Conf['Embedding']
i = 0
items = $$ '.embedder', post.nodes.comment
while el = items[i++]
$.on el, 'click', Embedding.cb.click
Embedding.cb.toggle.call el if $.hasClass el, 'embedded'
return
if Conf['Embedding']
i = 0
items = $$ '.embedder', post.nodes.comment
while el = items[i++]
$.on el, 'click', Embedding.cb.click
Embedding.cb.toggle.call el if $.hasClass el, 'embedded'
if Conf['Cover Preview']
i = 0
items = $$ '.linkify', post.nodes.comment
while el = items[i++]
data = Embedding.services el
Embedding.preview data
return
process: (link, post) ->
return unless Conf['Embedding'] or Conf['Link Title'] or Conf['Cover Preview']