From 2293ea3393e3597455424676b2b1b60eadbb97dc Mon Sep 17 00:00:00 2001 From: noface Date: Sun, 27 Nov 2016 01:52:12 +0100 Subject: [PATCH] Run on clones as well. --- src/Linkification/Embedding.coffee | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/Linkification/Embedding.coffee b/src/Linkification/Embedding.coffee index 4f9b66aff..08fa95a63 100644 --- a/src/Linkification/Embedding.coffee +++ b/src/Linkification/Embedding.coffee @@ -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']