From 02bf6efd1cf805caf31ab56d787497069a6df2f0 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Wed, 16 May 2012 16:20:38 +0200 Subject: [PATCH] Fix inlining of hidden posts. Styling fixes of inlined posts. --- 4chan_x.user.js | 11 ++++++++--- script.coffee | 9 +++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index aa27efb2a..9f62511c1 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -3149,12 +3149,14 @@ return $.replace(inline, newInline); }, clone: function(id, el) { - var clone, node, _i, _len, _ref; + var clone, node, post, _i, _len, _ref; clone = $.el('div', { className: 'postContainer inline', id: "i_pc" + id }); - $.add(clone, el.cloneNode(true)); + post = el.cloneNode(true); + post.hidden = false; + $.add(clone, post); _ref = $$('[id]', clone); for (_i = 0, _len = _ref.length; _i < _len; _i++) { node = _ref[_i]; @@ -4518,13 +4520,16 @@ div.opContainer {\ opacity: .5;\ }\ .inline {\ - overflow: hidden;\ background-color: rgba(255, 255, 255, 0.15);\ border: 1px solid rgba(128, 128, 128, 0.5);\ + display: table;\ + margin: 2px;\ }\ .inline .post {\ background: none;\ border: none;\ + margin: 0;\ + padding: 0;\ }\ .filter_highlight.thread > .opContainer {\ box-shadow: inset 5px 0 rgba(255,0,0,0.5);\ diff --git a/script.coffee b/script.coffee index 7055b03d6..aa20fda18 100644 --- a/script.coffee +++ b/script.coffee @@ -2401,7 +2401,9 @@ QuoteInline = clone = $.el 'div', className: 'postContainer inline' id: "i_pc#{id}" - $.add clone, el.cloneNode true + post = el.cloneNode true + post.hidden = false + $.add clone, post for node in $$ '[id]', clone # Don't mess with other features node.id = "i_#{node.id}" @@ -3516,13 +3518,16 @@ div.opContainer { opacity: .5; } .inline { - overflow: hidden; background-color: rgba(255, 255, 255, 0.15); border: 1px solid rgba(128, 128, 128, 0.5); + display: table; + margin: 2px; } .inline .post { background: none; border: none; + margin: 0; + padding: 0; } .filter_highlight.thread > .opContainer { box-shadow: inset 5px 0 rgba(255,0,0,0.5);