Remove obsolete complexities in embedding code.

This commit is contained in:
ccd0 2016-11-26 02:36:00 -08:00
parent 7e5d71f210
commit e5a0213461
2 changed files with 5 additions and 9 deletions

View File

@ -59,12 +59,10 @@ Embedding =
$.after link, [$.tn(' '), embed] $.after link, [$.tn(' '), embed]
if Conf['Auto-embed'] and !Conf['Floating Embeds'] and !post.isFetchedQuote if Conf['Auto-embed'] and !Conf['Floating Embeds'] and !post.isFetchedQuote
autoEmbed = -> if $.hasClass(doc, 'catalog-mode')
if doc.contains(embed) and not $.hasClass(doc, 'catalog-mode') $.addClass embed, 'embed-removed'
$.off d, 'PostsInserted', autoEmbed else
Embedding.cb.toggle.call embed Embedding.cb.toggle.call embed
$.on d, 'PostsInserted', autoEmbed
autoEmbed()
ready: -> ready: ->
return if !Main.isThisPageLegit() return if !Main.isThisPageLegit()

View File

@ -2033,9 +2033,7 @@ a:only-of-type > .remove {
} }
/* Embedding */ /* Embedding */
.embedder:not(.embedded) > span, .embedder:not(.embedded) > span {
:root.catalog-mode .embedder > span,
:root.catalog-mode .board .media-embed {
display: none; display: none;
} }
#embedding { #embedding {