Conflicts:
	builds/appchan-x.user.js
	builds/crx/script.js
This commit is contained in:
Zixaphir 2015-01-20 15:32:34 -07:00 committed by ccd0
parent 56efa1d829
commit ee022ce8ea

View File

@ -117,26 +117,25 @@ Embedding =
$.rmClass Embedding.dialog, 'empty' $.rmClass Embedding.dialog, 'empty'
return return
if $.hasClass @, "embedded" if $.hasClass @, "embedded"
$.rm @previousElementSibling unless $.hasClass @previousElementSibling, 'linkify' $.rm @nextElementSibling
@previousElementSibling.hidden = false
@textContent = '(embed)' @textContent = '(embed)'
else else
@previousElementSibling.hidden = true $.after @, Embedding.cb.embed @
$.before @, Embedding.cb.embed @
@textContent = '(unembed)' @textContent = '(unembed)'
$.toggleClass @, 'embedded' $.toggleClass @, 'embedded'
embed: (a) -> embed: (a) ->
# We create an element to embed # We create an element to embed
el = (type = Embedding.types[a.dataset.key]).el a container = $.el 'div'
$.add container, el = (type = Embedding.types[a.dataset.key]).el a
# Set style values. # Set style values.
el.style.cssText = if type.style? el.style.cssText = if type.style?
type.style type.style
else else
"border: 0; width: 640px; height: 390px" "border:0;width:640px;height:390px"
return el return container
title: (req, data) -> title: (req, data) ->
{key, uid, options, link, post} = data {key, uid, options, link, post} = data