diff --git a/builds/appchan-x.js b/builds/appchan-x.js index 61bac9c1a..f96e161d2 100644 --- a/builds/appchan-x.js +++ b/builds/appchan-x.js @@ -5829,14 +5829,17 @@ } }, add: function(quotelink, boardID, threadID, postID, context) { - var inline, isBacklink, post; + var inline, isBacklink, post, qroot, root; isBacklink = $.hasClass(quotelink, 'backlink'); inline = $.el('div', { id: "i" + postID, className: 'inline' }); - $.after(QuoteInline.findRoot(quotelink, isBacklink), inline); + root = QuoteInline.findRoot(quotelink, isBacklink); + $.after(root, inline); + qroot = $.x('ancestor::*[contains(@class,"postContainer")][1]', root); + $.addClass(qroot, 'hasInline'); Get.postClone(boardID, threadID, postID, inline, context); if (!((post = g.posts["" + boardID + "." + postID]) && context.thread === post.thread)) { return; @@ -5851,12 +5854,16 @@ return Unread.readSinglePost(post); }, rm: function(quotelink, boardID, threadID, postID, context) { - var el, inlined, isBacklink, post, root, _ref; + var el, inlined, isBacklink, post, qroot, root, _ref; isBacklink = $.hasClass(quotelink, 'backlink'); root = QuoteInline.findRoot(quotelink, isBacklink); root = $.x("following-sibling::div[@id='i" + postID + "'][1]", root); + qroot = $.x('ancestor::*[contains(@class,"postContainer")][1]', root); $.rm(root); + if (!$('.inline', qroot)) { + $.rmClass(qroot, 'hasInline'); + } if (!(el = root.firstElementChild)) { return; } @@ -11075,7 +11082,7 @@ }[_conf["Slideout Navigation"]] + "\n/* Watcher */\n#watcher {\n position: fixed;\n z-index: 14;\n padding: 2px;\n " + (_conf["Rounded Edges"] ? "border-radius: 3px;" : "") + "\n}\n#watcher > div {\n max-height: 1.3em;\n overflow: hidden;\n} \n" + (_conf['Slideout Watcher'] ? "#watcher { width: " + width + "px; " + Style.sidebarLocation[0] + ": 2px !important; " + Style.sidebarLocation[1] + ": auto !important; " + Style.sizing + ": border-box;}#watcher .move { cursor: default; text-decoration: " + (_conf["Underline Links"] ? "underline" : "none") + ";}#watcher > div { overflow: hidden;}#watcher:hover { overflow-y: auto;}#watcher:not(:hover) { height: 0; overflow: hidden; border: 0 none; padding: 0;}" : "#watcher { width: 200px;}#watcher:not(:hover) { max-height: 200px; overflow: hidden;} ") + "\n/* Announcements */\n#globalMessage {\n text-align: center;\n " + (_conf["Rounded Edges"] ? "border-radius: 3px;" : "") + "\n}\n" + ({ 'slideout': " #globalMessage { position: fixed; padding: 2px; width: " + width + "px; " + Style.sidebarLocation[0] + ": 2px !important; " + Style.sidebarLocation[1] + ": auto !important;}#globalMessage h3 { margin: 0;}#globalMessage:hover { " + Style.sizing + ": border-box; overflow-y: auto;}#globalMessage:not(:hover) { height: 0; overflow: hidden; padding: 0; border: 0 none;}", 'hide': "#globalMessage { display: none !important;}" - }[_conf['Announcements']] || "") + "\n/* Threads */\n.thread {\n margin: " + (parseInt(_conf["Top Thread Padding"], 10)) + "px 0 " + (parseInt(_conf["Bottom Thread Padding"], 10)) + "px 0;\n " + (_conf["Rounded Edges"] ? "border-radius: 4px;" : "") + "\n}\n/* Thread Clearfix */\n.thread > div:last-of-type::after {\n display: block;\n content: ' ';\n clear: both;\n}\n/* Posts */\n.expanding {\n opacity: .5;\n}\n.fileText:hover .fntrunc,\n.fileText:not(:hover) .fnfull,\n.expanded-image > .post > .file > .fileThumb > img[data-md5],\n.post > .file > .fileThumb > .full-image {\n display: none;\n}\n.expanded-image > .post > .file > .fileThumb > .full-image {\n display: block;\n}\n.summary {\n margin-bottom: " + Style.replyMargin + "px;\n}\n.post {\n margin-bottom: " + Style.replyMargin + "px;\n}\n.replyContainer:last-of-type .post {\n margin-bottom: 0;\n}\n.menu-button {\n position: relative;\n}\n.stub .menu-button,\n.post .menu-button,\n.hide-thread-button,\n.show-thread-button span,\n.hide-reply-button,\n.show-reply-button span {\n float: right;\n}\n.post .menu-button,\n.hide-thread-button,\n.hide-reply-button {\n margin: 0 3px;\n opacity: 0;\n " + agent + "transition: opacity .3s ease-out 0s;\n}\n.post:hover .hide-reply-button,\n.post:hover .menu-button,\n.post:hover .hide-thread-button,\n.hidden_thread .hide-thread-button,\n.hidden_thread .menu-button,\n.inline .hide-reply-button,\n.inline .menu-button {\n opacity: 1;\n}\n.hidden_thread {\n text-align: right;\n}\n" + (_conf['Color user IDs'] ? ".posteruid .hand { padding: .1em .3em; border-radius: 1em; font-size: 80%;}" : "") + "\n.postInfo > span {\n vertical-align: bottom;\n}\n.subject,\n.name {\n " + (_conf["Bolds"] ? 'font-weight: 600;' : '') + "\n}\n.postertrip {\n " + (_conf["Italics"] ? 'font-style: italic;' : '') + "\n}\n.replylink {\n text-decoration: " + (_conf["Underline Links"] ? "underline" : "none") + ";\n}\n.fileInfo {\n padding: 0 3px;\n}\n.fileThumb {\n float: left;\n margin: 3px 20px;\n outline: none;\n}\n.reply.post {\n " + Style.sizing + ": border-box;\n}\n" + (_conf["Fit Width Replies"] ? ".reply.post { display: block; overflow: hidden;}.expanded-image .reply.post { width: 100%;}" : ".reply.post { display: inline-block;}") + "\n.expanded-image .reply.post {\n display: inline-block;\n overflow: visible;\n clear: both;\n} \n.post {\n " + (_conf["Rounded Edges"] ? "border-radius: 3px;" : "") + "\n}\n.postMessage {\n margin: " + _conf['Vertical Post Padding'] + "px " + _conf['Horizontal Post Padding'] + "px;\n}\n.spoiler,\ns {\n text-decoration: none;\n}\n/* Reply Clearfix */\n.reply.post .postMessage {\n clear: right;\n}\n" + (_conf['Force Reply Break'] || _conf["OP Background"] ? ".op.post .postMessage::after { display: block; content: ' '; clear: both;}" : "") + "\n/* OP */\n.favicon {\n vertical-align: bottom;\n}\n" + (_conf["OP Background"] ? ".op.post { " + Style.sizing + ": border-box;}" : "") + "\n/* Summary */\n" + (_conf["Force Reply Break"] ? ".summary { clear: both;}" : "") + "\n/* Inlined */\n.inline {\n margin: 2px 8px 2px 2px;\n}\n.post .inline {\n margin: 2px;\n}\n.inline .replyContainer {\n display: inline-block;\n}\n/* Inlined Clearfix */\n.inline .postMessage::after {\n clear: both;\n display: block;\n content: \"\";\n}\n/* Quotes */\n.inlined {\n opacity: .5;\n}\n.quotelink {\n text-decoration: " + (_conf["Underline Links"] ? "underline" : "none") + ";\n}\n.filtered,\n.quotelink.filtered {\n text-decoration: underline;\n text-decoration: line-through !important;\n}\n/* Quote Threading */\n.threadContainer {\n margin-left: 2em;\n border-left: 1px solid;\n}\n.threadOP {\n clear: both;\n}\n/* Backlinks */\n.backlink {\n text-decoration: " + (_conf["Underline Links"] ? "underline" : "none") + ";\n}\n.backlink.dead {\n text-decoration: none;\n}\n" + (_conf["Filtered Backlinks"] ? ".filtered.backlink { display: none;}" : void 0) + "\n" + { + }[_conf['Announcements']] || "") + "\n/* Threads */\n.thread {\n margin: " + (parseInt(_conf["Top Thread Padding"], 10)) + "px 0 " + (parseInt(_conf["Bottom Thread Padding"], 10)) + "px 0;\n " + (_conf["Rounded Edges"] ? "border-radius: 4px;" : "") + "\n}\n/* Thread Clearfix */\n.thread > div:last-of-type::after {\n display: block;\n content: ' ';\n clear: both;\n}\n/* Posts */\n.expanding {\n opacity: .5;\n}\n.fileText:hover .fntrunc,\n.fileText:not(:hover) .fnfull,\n.expanded-image > .post > .file > .fileThumb > img[data-md5],\n.post > .file > .fileThumb > .full-image {\n display: none;\n}\n.expanded-image > .post > .file > .fileThumb > .full-image {\n display: block;\n}\n.summary {\n margin-bottom: " + Style.replyMargin + "px;\n}\n.post {\n margin-bottom: " + Style.replyMargin + "px;\n}\n.replyContainer:last-of-type .post {\n margin-bottom: 0;\n}\n.menu-button {\n position: relative;\n}\n.stub .menu-button,\n.post .menu-button,\n.hide-thread-button,\n.show-thread-button span,\n.hide-reply-button,\n.show-reply-button span {\n float: right;\n}\n.post .menu-button,\n.hide-thread-button,\n.hide-reply-button {\n margin: 0 3px;\n opacity: 0;\n " + agent + "transition: opacity .3s ease-out 0s;\n}\n.post:hover .hide-reply-button,\n.post:hover .menu-button,\n.post:hover .hide-thread-button,\n.hidden_thread .hide-thread-button,\n.hidden_thread .menu-button,\n.inline .hide-reply-button,\n.inline .menu-button {\n opacity: 1;\n}\n.hidden_thread {\n text-align: right;\n}\n" + (_conf['Color user IDs'] ? ".posteruid .hand { padding: .1em .3em; border-radius: 1em; font-size: 80%;}" : "") + "\n.postInfo > span {\n vertical-align: bottom;\n}\n.subject,\n.name {\n " + (_conf["Bolds"] ? 'font-weight: 600;' : '') + "\n}\n.postertrip {\n " + (_conf["Italics"] ? 'font-style: italic;' : '') + "\n}\n.replylink {\n text-decoration: " + (_conf["Underline Links"] ? "underline" : "none") + ";\n}\n.fileInfo {\n padding: 0 3px;\n}\n.fileThumb {\n float: left;\n margin: 3px 20px;\n outline: none;\n}\n.reply.post {\n " + Style.sizing + ": border-box;\n}\n" + (_conf["Fit Width Replies"] ? ".reply.post { display: block; overflow: hidden;}.expanded-image .reply.post { width: 100%;}" : ".reply.post { display: inline-block;}") + "\n.expanded-image .reply.post,\n.hasInline .reply.post {\n display: inline-block;\n overflow: visible;\n clear: both;\n} \n.post {\n " + (_conf["Rounded Edges"] ? "border-radius: 3px;" : "") + "\n}\n.postMessage {\n margin: " + _conf['Vertical Post Padding'] + "px " + _conf['Horizontal Post Padding'] + "px;\n}\n.spoiler,\ns {\n text-decoration: none;\n}\n/* Reply Clearfix */\n.reply.post .postMessage {\n clear: right;\n}\n" + (_conf['Force Reply Break'] || _conf["OP Background"] ? ".op.post .postMessage::after { display: block; content: ' '; clear: both;}" : "") + "\n/* OP */\n.favicon {\n vertical-align: bottom;\n}\n" + (_conf["OP Background"] ? ".op.post { " + Style.sizing + ": border-box;}" : "") + "\n/* Summary */\n" + (_conf["Force Reply Break"] ? ".summary { clear: both;}" : "") + "\n/* Inlined */\n.inline {\n margin: 2px 8px 2px 2px;\n}\n.post .inline {\n margin: 2px;\n}\n.inline .replyContainer {\n display: inline-block;\n}\n/* Inlined Clearfix */\n.inline .postMessage::after {\n clear: both;\n display: block;\n content: \"\";\n}\n/* Quotes */\n.inlined {\n opacity: .5;\n}\n.quotelink {\n text-decoration: " + (_conf["Underline Links"] ? "underline" : "none") + ";\n}\n.filtered,\n.quotelink.filtered {\n text-decoration: underline;\n text-decoration: line-through !important;\n}\n/* Quote Threading */\n.threadContainer {\n margin-left: 2em;\n border-left: 1px solid;\n}\n.threadOP {\n clear: both;\n}\n/* Backlinks */\n.backlink {\n text-decoration: " + (_conf["Underline Links"] ? "underline" : "none") + ";\n}\n.backlink.dead {\n text-decoration: none;\n}\n" + (_conf["Filtered Backlinks"] ? ".filtered.backlink { display: none;}" : void 0) + "\n" + { "lower left": ".container { padding: 0 5px; max-width: 100%;}.reply.quoted { position: relative; padding-bottom: 1.7em;}.reply .container { position: absolute; left: 0; bottom: 0; padding: 0 5px;}.reply .container::before { content: 'REPLIES: ';}#qp .container { position: static; max-width: 100%;}#qp .container::before { content: '';}.inline .container { position: static; max-width: 100%;}.inline .container::before { content: '';}", 'lower right': ".reply.quoted { position: relative; padding-bottom: 1.7em;}.reply .container { position: absolute; right: 0; bottom: 0;}.container::before { content: 'REPLIES: ';}.container { max-width: 100%; padding: 0 5px;}#qp .container { position: static; max-width: 100%;}#qp .container::before { content: '';}.inline .container { position: static; float: none;}.inline .container::before { content: '';}", 'default': "" diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index d5769af50..43028217f 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -5825,14 +5825,17 @@ } }, add: function(quotelink, boardID, threadID, postID, context) { - var inline, isBacklink, post; + var inline, isBacklink, post, qroot, root; isBacklink = $.hasClass(quotelink, 'backlink'); inline = $.el('div', { id: "i" + postID, className: 'inline' }); - $.after(QuoteInline.findRoot(quotelink, isBacklink), inline); + root = QuoteInline.findRoot(quotelink, isBacklink); + $.after(root, inline); + qroot = $.x('ancestor::*[contains(@class,"postContainer")][1]', root); + $.addClass(qroot, 'hasInline'); Get.postClone(boardID, threadID, postID, inline, context); if (!((post = g.posts["" + boardID + "." + postID]) && context.thread === post.thread)) { return; @@ -5847,12 +5850,16 @@ return Unread.readSinglePost(post); }, rm: function(quotelink, boardID, threadID, postID, context) { - var el, inlined, isBacklink, post, root, _ref; + var el, inlined, isBacklink, post, qroot, root, _ref; isBacklink = $.hasClass(quotelink, 'backlink'); root = QuoteInline.findRoot(quotelink, isBacklink); root = $.x("following-sibling::div[@id='i" + postID + "'][1]", root); + qroot = $.x('ancestor::*[contains(@class,"postContainer")][1]', root); $.rm(root); + if (!$('.inline', qroot)) { + $.rmClass(qroot, 'hasInline'); + } if (!(el = root.firstElementChild)) { return; } @@ -11096,7 +11103,7 @@ }[_conf["Slideout Navigation"]] + "\n/* Watcher */\n#watcher {\n position: fixed;\n z-index: 14;\n padding: 2px;\n " + (_conf["Rounded Edges"] ? "border-radius: 3px;" : "") + "\n}\n#watcher > div {\n max-height: 1.3em;\n overflow: hidden;\n} \n" + (_conf['Slideout Watcher'] ? "#watcher { width: " + width + "px; " + Style.sidebarLocation[0] + ": 2px !important; " + Style.sidebarLocation[1] + ": auto !important; " + Style.sizing + ": border-box;}#watcher .move { cursor: default; text-decoration: " + (_conf["Underline Links"] ? "underline" : "none") + ";}#watcher > div { overflow: hidden;}#watcher:hover { overflow-y: auto;}#watcher:not(:hover) { height: 0; overflow: hidden; border: 0 none; padding: 0;}" : "#watcher { width: 200px;}#watcher:not(:hover) { max-height: 200px; overflow: hidden;} ") + "\n/* Announcements */\n#globalMessage {\n text-align: center;\n " + (_conf["Rounded Edges"] ? "border-radius: 3px;" : "") + "\n}\n" + ({ 'slideout': " #globalMessage { position: fixed; padding: 2px; width: " + width + "px; " + Style.sidebarLocation[0] + ": 2px !important; " + Style.sidebarLocation[1] + ": auto !important;}#globalMessage h3 { margin: 0;}#globalMessage:hover { " + Style.sizing + ": border-box; overflow-y: auto;}#globalMessage:not(:hover) { height: 0; overflow: hidden; padding: 0; border: 0 none;}", 'hide': "#globalMessage { display: none !important;}" - }[_conf['Announcements']] || "") + "\n/* Threads */\n.thread {\n margin: " + (parseInt(_conf["Top Thread Padding"], 10)) + "px 0 " + (parseInt(_conf["Bottom Thread Padding"], 10)) + "px 0;\n " + (_conf["Rounded Edges"] ? "border-radius: 4px;" : "") + "\n}\n/* Thread Clearfix */\n.thread > div:last-of-type::after {\n display: block;\n content: ' ';\n clear: both;\n}\n/* Posts */\n.expanding {\n opacity: .5;\n}\n.fileText:hover .fntrunc,\n.fileText:not(:hover) .fnfull,\n.expanded-image > .post > .file > .fileThumb > img[data-md5],\n.post > .file > .fileThumb > .full-image {\n display: none;\n}\n.expanded-image > .post > .file > .fileThumb > .full-image {\n display: block;\n}\n.summary {\n margin-bottom: " + Style.replyMargin + "px;\n}\n.post {\n margin-bottom: " + Style.replyMargin + "px;\n}\n.replyContainer:last-of-type .post {\n margin-bottom: 0;\n}\n.menu-button {\n position: relative;\n}\n.stub .menu-button,\n.post .menu-button,\n.hide-thread-button,\n.show-thread-button span,\n.hide-reply-button,\n.show-reply-button span {\n float: right;\n}\n.post .menu-button,\n.hide-thread-button,\n.hide-reply-button {\n margin: 0 3px;\n opacity: 0;\n " + agent + "transition: opacity .3s ease-out 0s;\n}\n.post:hover .hide-reply-button,\n.post:hover .menu-button,\n.post:hover .hide-thread-button,\n.hidden_thread .hide-thread-button,\n.hidden_thread .menu-button,\n.inline .hide-reply-button,\n.inline .menu-button {\n opacity: 1;\n}\n.hidden_thread {\n text-align: right;\n}\n" + (_conf['Color user IDs'] ? ".posteruid .hand { padding: .1em .3em; border-radius: 1em; font-size: 80%;}" : "") + "\n.postInfo > span {\n vertical-align: bottom;\n}\n.subject,\n.name {\n " + (_conf["Bolds"] ? 'font-weight: 600;' : '') + "\n}\n.postertrip {\n " + (_conf["Italics"] ? 'font-style: italic;' : '') + "\n}\n.replylink {\n text-decoration: " + (_conf["Underline Links"] ? "underline" : "none") + ";\n}\n.fileInfo {\n padding: 0 3px;\n}\n.fileThumb {\n float: left;\n margin: 3px 20px;\n outline: none;\n}\n.reply.post {\n " + Style.sizing + ": border-box;\n}\n" + (_conf["Fit Width Replies"] ? ".reply.post { display: block; overflow: hidden;}.expanded-image .reply.post { width: 100%;}" : ".reply.post { display: inline-block;}") + "\n.expanded-image .reply.post {\n display: inline-block;\n overflow: visible;\n clear: both;\n} \n.post {\n " + (_conf["Rounded Edges"] ? "border-radius: 3px;" : "") + "\n}\n.postMessage {\n margin: " + _conf['Vertical Post Padding'] + "px " + _conf['Horizontal Post Padding'] + "px;\n}\n.spoiler,\ns {\n text-decoration: none;\n}\n/* Reply Clearfix */\n.reply.post .postMessage {\n clear: right;\n}\n" + (_conf['Force Reply Break'] || _conf["OP Background"] ? ".op.post .postMessage::after { display: block; content: ' '; clear: both;}" : "") + "\n/* OP */\n.favicon {\n vertical-align: bottom;\n}\n" + (_conf["OP Background"] ? ".op.post { " + Style.sizing + ": border-box;}" : "") + "\n/* Summary */\n" + (_conf["Force Reply Break"] ? ".summary { clear: both;}" : "") + "\n/* Inlined */\n.inline {\n margin: 2px 8px 2px 2px;\n}\n.post .inline {\n margin: 2px;\n}\n.inline .replyContainer {\n display: inline-block;\n}\n/* Inlined Clearfix */\n.inline .postMessage::after {\n clear: both;\n display: block;\n content: \"\";\n}\n/* Quotes */\n.inlined {\n opacity: .5;\n}\n.quotelink {\n text-decoration: " + (_conf["Underline Links"] ? "underline" : "none") + ";\n}\n.filtered,\n.quotelink.filtered {\n text-decoration: underline;\n text-decoration: line-through !important;\n}\n/* Quote Threading */\n.threadContainer {\n margin-left: 2em;\n border-left: 1px solid;\n}\n.threadOP {\n clear: both;\n}\n/* Backlinks */\n.backlink {\n text-decoration: " + (_conf["Underline Links"] ? "underline" : "none") + ";\n}\n.backlink.dead {\n text-decoration: none;\n}\n" + (_conf["Filtered Backlinks"] ? ".filtered.backlink { display: none;}" : void 0) + "\n" + { + }[_conf['Announcements']] || "") + "\n/* Threads */\n.thread {\n margin: " + (parseInt(_conf["Top Thread Padding"], 10)) + "px 0 " + (parseInt(_conf["Bottom Thread Padding"], 10)) + "px 0;\n " + (_conf["Rounded Edges"] ? "border-radius: 4px;" : "") + "\n}\n/* Thread Clearfix */\n.thread > div:last-of-type::after {\n display: block;\n content: ' ';\n clear: both;\n}\n/* Posts */\n.expanding {\n opacity: .5;\n}\n.fileText:hover .fntrunc,\n.fileText:not(:hover) .fnfull,\n.expanded-image > .post > .file > .fileThumb > img[data-md5],\n.post > .file > .fileThumb > .full-image {\n display: none;\n}\n.expanded-image > .post > .file > .fileThumb > .full-image {\n display: block;\n}\n.summary {\n margin-bottom: " + Style.replyMargin + "px;\n}\n.post {\n margin-bottom: " + Style.replyMargin + "px;\n}\n.replyContainer:last-of-type .post {\n margin-bottom: 0;\n}\n.menu-button {\n position: relative;\n}\n.stub .menu-button,\n.post .menu-button,\n.hide-thread-button,\n.show-thread-button span,\n.hide-reply-button,\n.show-reply-button span {\n float: right;\n}\n.post .menu-button,\n.hide-thread-button,\n.hide-reply-button {\n margin: 0 3px;\n opacity: 0;\n " + agent + "transition: opacity .3s ease-out 0s;\n}\n.post:hover .hide-reply-button,\n.post:hover .menu-button,\n.post:hover .hide-thread-button,\n.hidden_thread .hide-thread-button,\n.hidden_thread .menu-button,\n.inline .hide-reply-button,\n.inline .menu-button {\n opacity: 1;\n}\n.hidden_thread {\n text-align: right;\n}\n" + (_conf['Color user IDs'] ? ".posteruid .hand { padding: .1em .3em; border-radius: 1em; font-size: 80%;}" : "") + "\n.postInfo > span {\n vertical-align: bottom;\n}\n.subject,\n.name {\n " + (_conf["Bolds"] ? 'font-weight: 600;' : '') + "\n}\n.postertrip {\n " + (_conf["Italics"] ? 'font-style: italic;' : '') + "\n}\n.replylink {\n text-decoration: " + (_conf["Underline Links"] ? "underline" : "none") + ";\n}\n.fileInfo {\n padding: 0 3px;\n}\n.fileThumb {\n float: left;\n margin: 3px 20px;\n outline: none;\n}\n.reply.post {\n " + Style.sizing + ": border-box;\n}\n" + (_conf["Fit Width Replies"] ? ".reply.post { display: block; overflow: hidden;}.expanded-image .reply.post { width: 100%;}" : ".reply.post { display: inline-block;}") + "\n.expanded-image .reply.post,\n.hasInline .reply.post {\n display: inline-block;\n overflow: visible;\n clear: both;\n} \n.post {\n " + (_conf["Rounded Edges"] ? "border-radius: 3px;" : "") + "\n}\n.postMessage {\n margin: " + _conf['Vertical Post Padding'] + "px " + _conf['Horizontal Post Padding'] + "px;\n}\n.spoiler,\ns {\n text-decoration: none;\n}\n/* Reply Clearfix */\n.reply.post .postMessage {\n clear: right;\n}\n" + (_conf['Force Reply Break'] || _conf["OP Background"] ? ".op.post .postMessage::after { display: block; content: ' '; clear: both;}" : "") + "\n/* OP */\n.favicon {\n vertical-align: bottom;\n}\n" + (_conf["OP Background"] ? ".op.post { " + Style.sizing + ": border-box;}" : "") + "\n/* Summary */\n" + (_conf["Force Reply Break"] ? ".summary { clear: both;}" : "") + "\n/* Inlined */\n.inline {\n margin: 2px 8px 2px 2px;\n}\n.post .inline {\n margin: 2px;\n}\n.inline .replyContainer {\n display: inline-block;\n}\n/* Inlined Clearfix */\n.inline .postMessage::after {\n clear: both;\n display: block;\n content: \"\";\n}\n/* Quotes */\n.inlined {\n opacity: .5;\n}\n.quotelink {\n text-decoration: " + (_conf["Underline Links"] ? "underline" : "none") + ";\n}\n.filtered,\n.quotelink.filtered {\n text-decoration: underline;\n text-decoration: line-through !important;\n}\n/* Quote Threading */\n.threadContainer {\n margin-left: 2em;\n border-left: 1px solid;\n}\n.threadOP {\n clear: both;\n}\n/* Backlinks */\n.backlink {\n text-decoration: " + (_conf["Underline Links"] ? "underline" : "none") + ";\n}\n.backlink.dead {\n text-decoration: none;\n}\n" + (_conf["Filtered Backlinks"] ? ".filtered.backlink { display: none;}" : void 0) + "\n" + { "lower left": ".container { padding: 0 5px; max-width: 100%;}.reply.quoted { position: relative; padding-bottom: 1.7em;}.reply .container { position: absolute; left: 0; bottom: 0; padding: 0 5px;}.reply .container::before { content: 'REPLIES: ';}#qp .container { position: static; max-width: 100%;}#qp .container::before { content: '';}.inline .container { position: static; max-width: 100%;}.inline .container::before { content: '';}", 'lower right': ".reply.quoted { position: relative; padding-bottom: 1.7em;}.reply .container { position: absolute; right: 0; bottom: 0;}.container::before { content: 'REPLIES: ';}.container { max-width: 100%; padding: 0 5px;}#qp .container { position: static; max-width: 100%;}#qp .container::before { content: '';}.inline .container { position: static; float: none;}.inline .container::before { content: '';}", 'default': "" diff --git a/builds/crx/script.js b/builds/crx/script.js index 6570a4727..47af94884 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -5826,14 +5826,17 @@ } }, add: function(quotelink, boardID, threadID, postID, context) { - var inline, isBacklink, post; + var inline, isBacklink, post, qroot, root; isBacklink = $.hasClass(quotelink, 'backlink'); inline = $.el('div', { id: "i" + postID, className: 'inline' }); - $.after(QuoteInline.findRoot(quotelink, isBacklink), inline); + root = QuoteInline.findRoot(quotelink, isBacklink); + $.after(root, inline); + qroot = $.x('ancestor::*[contains(@class,"postContainer")][1]', root); + $.addClass(qroot, 'hasInline'); Get.postClone(boardID, threadID, postID, inline, context); if (!((post = g.posts["" + boardID + "." + postID]) && context.thread === post.thread)) { return; @@ -5848,12 +5851,16 @@ return Unread.readSinglePost(post); }, rm: function(quotelink, boardID, threadID, postID, context) { - var el, inlined, isBacklink, post, root, _ref; + var el, inlined, isBacklink, post, qroot, root, _ref; isBacklink = $.hasClass(quotelink, 'backlink'); root = QuoteInline.findRoot(quotelink, isBacklink); root = $.x("following-sibling::div[@id='i" + postID + "'][1]", root); + qroot = $.x('ancestor::*[contains(@class,"postContainer")][1]', root); $.rm(root); + if (!$('.inline', qroot)) { + $.rmClass(qroot, 'hasInline'); + } if (!(el = root.firstElementChild)) { return; } @@ -11078,7 +11085,7 @@ }[_conf["Slideout Navigation"]] + "\n/* Watcher */\n#watcher {\n position: fixed;\n z-index: 14;\n padding: 2px;\n " + (_conf["Rounded Edges"] ? "border-radius: 3px;" : "") + "\n}\n#watcher > div {\n max-height: 1.3em;\n overflow: hidden;\n} \n" + (_conf['Slideout Watcher'] ? "#watcher { width: " + width + "px; " + Style.sidebarLocation[0] + ": 2px !important; " + Style.sidebarLocation[1] + ": auto !important; " + Style.sizing + ": border-box;}#watcher .move { cursor: default; text-decoration: " + (_conf["Underline Links"] ? "underline" : "none") + ";}#watcher > div { overflow: hidden;}#watcher:hover { overflow-y: auto;}#watcher:not(:hover) { height: 0; overflow: hidden; border: 0 none; padding: 0;}" : "#watcher { width: 200px;}#watcher:not(:hover) { max-height: 200px; overflow: hidden;} ") + "\n/* Announcements */\n#globalMessage {\n text-align: center;\n " + (_conf["Rounded Edges"] ? "border-radius: 3px;" : "") + "\n}\n" + ({ 'slideout': " #globalMessage { position: fixed; padding: 2px; width: " + width + "px; " + Style.sidebarLocation[0] + ": 2px !important; " + Style.sidebarLocation[1] + ": auto !important;}#globalMessage h3 { margin: 0;}#globalMessage:hover { " + Style.sizing + ": border-box; overflow-y: auto;}#globalMessage:not(:hover) { height: 0; overflow: hidden; padding: 0; border: 0 none;}", 'hide': "#globalMessage { display: none !important;}" - }[_conf['Announcements']] || "") + "\n/* Threads */\n.thread {\n margin: " + (parseInt(_conf["Top Thread Padding"], 10)) + "px 0 " + (parseInt(_conf["Bottom Thread Padding"], 10)) + "px 0;\n " + (_conf["Rounded Edges"] ? "border-radius: 4px;" : "") + "\n}\n/* Thread Clearfix */\n.thread > div:last-of-type::after {\n display: block;\n content: ' ';\n clear: both;\n}\n/* Posts */\n.expanding {\n opacity: .5;\n}\n.fileText:hover .fntrunc,\n.fileText:not(:hover) .fnfull,\n.expanded-image > .post > .file > .fileThumb > img[data-md5],\n.post > .file > .fileThumb > .full-image {\n display: none;\n}\n.expanded-image > .post > .file > .fileThumb > .full-image {\n display: block;\n}\n.summary {\n margin-bottom: " + Style.replyMargin + "px;\n}\n.post {\n margin-bottom: " + Style.replyMargin + "px;\n}\n.replyContainer:last-of-type .post {\n margin-bottom: 0;\n}\n.menu-button {\n position: relative;\n}\n.stub .menu-button,\n.post .menu-button,\n.hide-thread-button,\n.show-thread-button span,\n.hide-reply-button,\n.show-reply-button span {\n float: right;\n}\n.post .menu-button,\n.hide-thread-button,\n.hide-reply-button {\n margin: 0 3px;\n opacity: 0;\n " + agent + "transition: opacity .3s ease-out 0s;\n}\n.post:hover .hide-reply-button,\n.post:hover .menu-button,\n.post:hover .hide-thread-button,\n.hidden_thread .hide-thread-button,\n.hidden_thread .menu-button,\n.inline .hide-reply-button,\n.inline .menu-button {\n opacity: 1;\n}\n.hidden_thread {\n text-align: right;\n}\n" + (_conf['Color user IDs'] ? ".posteruid .hand { padding: .1em .3em; border-radius: 1em; font-size: 80%;}" : "") + "\n.postInfo > span {\n vertical-align: bottom;\n}\n.subject,\n.name {\n " + (_conf["Bolds"] ? 'font-weight: 600;' : '') + "\n}\n.postertrip {\n " + (_conf["Italics"] ? 'font-style: italic;' : '') + "\n}\n.replylink {\n text-decoration: " + (_conf["Underline Links"] ? "underline" : "none") + ";\n}\n.fileInfo {\n padding: 0 3px;\n}\n.fileThumb {\n float: left;\n margin: 3px 20px;\n outline: none;\n}\n.reply.post {\n " + Style.sizing + ": border-box;\n}\n" + (_conf["Fit Width Replies"] ? ".reply.post { display: block; overflow: hidden;}.expanded-image .reply.post { width: 100%;}" : ".reply.post { display: inline-block;}") + "\n.expanded-image .reply.post {\n display: inline-block;\n overflow: visible;\n clear: both;\n} \n.post {\n " + (_conf["Rounded Edges"] ? "border-radius: 3px;" : "") + "\n}\n.postMessage {\n margin: " + _conf['Vertical Post Padding'] + "px " + _conf['Horizontal Post Padding'] + "px;\n}\n.spoiler,\ns {\n text-decoration: none;\n}\n/* Reply Clearfix */\n.reply.post .postMessage {\n clear: right;\n}\n" + (_conf['Force Reply Break'] || _conf["OP Background"] ? ".op.post .postMessage::after { display: block; content: ' '; clear: both;}" : "") + "\n/* OP */\n.favicon {\n vertical-align: bottom;\n}\n" + (_conf["OP Background"] ? ".op.post { " + Style.sizing + ": border-box;}" : "") + "\n/* Summary */\n" + (_conf["Force Reply Break"] ? ".summary { clear: both;}" : "") + "\n/* Inlined */\n.inline {\n margin: 2px 8px 2px 2px;\n}\n.post .inline {\n margin: 2px;\n}\n.inline .replyContainer {\n display: inline-block;\n}\n/* Inlined Clearfix */\n.inline .postMessage::after {\n clear: both;\n display: block;\n content: \"\";\n}\n/* Quotes */\n.inlined {\n opacity: .5;\n}\n.quotelink {\n text-decoration: " + (_conf["Underline Links"] ? "underline" : "none") + ";\n}\n.filtered,\n.quotelink.filtered {\n text-decoration: underline;\n text-decoration: line-through !important;\n}\n/* Quote Threading */\n.threadContainer {\n margin-left: 2em;\n border-left: 1px solid;\n}\n.threadOP {\n clear: both;\n}\n/* Backlinks */\n.backlink {\n text-decoration: " + (_conf["Underline Links"] ? "underline" : "none") + ";\n}\n.backlink.dead {\n text-decoration: none;\n}\n" + (_conf["Filtered Backlinks"] ? ".filtered.backlink { display: none;}" : void 0) + "\n" + { + }[_conf['Announcements']] || "") + "\n/* Threads */\n.thread {\n margin: " + (parseInt(_conf["Top Thread Padding"], 10)) + "px 0 " + (parseInt(_conf["Bottom Thread Padding"], 10)) + "px 0;\n " + (_conf["Rounded Edges"] ? "border-radius: 4px;" : "") + "\n}\n/* Thread Clearfix */\n.thread > div:last-of-type::after {\n display: block;\n content: ' ';\n clear: both;\n}\n/* Posts */\n.expanding {\n opacity: .5;\n}\n.fileText:hover .fntrunc,\n.fileText:not(:hover) .fnfull,\n.expanded-image > .post > .file > .fileThumb > img[data-md5],\n.post > .file > .fileThumb > .full-image {\n display: none;\n}\n.expanded-image > .post > .file > .fileThumb > .full-image {\n display: block;\n}\n.summary {\n margin-bottom: " + Style.replyMargin + "px;\n}\n.post {\n margin-bottom: " + Style.replyMargin + "px;\n}\n.replyContainer:last-of-type .post {\n margin-bottom: 0;\n}\n.menu-button {\n position: relative;\n}\n.stub .menu-button,\n.post .menu-button,\n.hide-thread-button,\n.show-thread-button span,\n.hide-reply-button,\n.show-reply-button span {\n float: right;\n}\n.post .menu-button,\n.hide-thread-button,\n.hide-reply-button {\n margin: 0 3px;\n opacity: 0;\n " + agent + "transition: opacity .3s ease-out 0s;\n}\n.post:hover .hide-reply-button,\n.post:hover .menu-button,\n.post:hover .hide-thread-button,\n.hidden_thread .hide-thread-button,\n.hidden_thread .menu-button,\n.inline .hide-reply-button,\n.inline .menu-button {\n opacity: 1;\n}\n.hidden_thread {\n text-align: right;\n}\n" + (_conf['Color user IDs'] ? ".posteruid .hand { padding: .1em .3em; border-radius: 1em; font-size: 80%;}" : "") + "\n.postInfo > span {\n vertical-align: bottom;\n}\n.subject,\n.name {\n " + (_conf["Bolds"] ? 'font-weight: 600;' : '') + "\n}\n.postertrip {\n " + (_conf["Italics"] ? 'font-style: italic;' : '') + "\n}\n.replylink {\n text-decoration: " + (_conf["Underline Links"] ? "underline" : "none") + ";\n}\n.fileInfo {\n padding: 0 3px;\n}\n.fileThumb {\n float: left;\n margin: 3px 20px;\n outline: none;\n}\n.reply.post {\n " + Style.sizing + ": border-box;\n}\n" + (_conf["Fit Width Replies"] ? ".reply.post { display: block; overflow: hidden;}.expanded-image .reply.post { width: 100%;}" : ".reply.post { display: inline-block;}") + "\n.expanded-image .reply.post,\n.hasInline .reply.post {\n display: inline-block;\n overflow: visible;\n clear: both;\n} \n.post {\n " + (_conf["Rounded Edges"] ? "border-radius: 3px;" : "") + "\n}\n.postMessage {\n margin: " + _conf['Vertical Post Padding'] + "px " + _conf['Horizontal Post Padding'] + "px;\n}\n.spoiler,\ns {\n text-decoration: none;\n}\n/* Reply Clearfix */\n.reply.post .postMessage {\n clear: right;\n}\n" + (_conf['Force Reply Break'] || _conf["OP Background"] ? ".op.post .postMessage::after { display: block; content: ' '; clear: both;}" : "") + "\n/* OP */\n.favicon {\n vertical-align: bottom;\n}\n" + (_conf["OP Background"] ? ".op.post { " + Style.sizing + ": border-box;}" : "") + "\n/* Summary */\n" + (_conf["Force Reply Break"] ? ".summary { clear: both;}" : "") + "\n/* Inlined */\n.inline {\n margin: 2px 8px 2px 2px;\n}\n.post .inline {\n margin: 2px;\n}\n.inline .replyContainer {\n display: inline-block;\n}\n/* Inlined Clearfix */\n.inline .postMessage::after {\n clear: both;\n display: block;\n content: \"\";\n}\n/* Quotes */\n.inlined {\n opacity: .5;\n}\n.quotelink {\n text-decoration: " + (_conf["Underline Links"] ? "underline" : "none") + ";\n}\n.filtered,\n.quotelink.filtered {\n text-decoration: underline;\n text-decoration: line-through !important;\n}\n/* Quote Threading */\n.threadContainer {\n margin-left: 2em;\n border-left: 1px solid;\n}\n.threadOP {\n clear: both;\n}\n/* Backlinks */\n.backlink {\n text-decoration: " + (_conf["Underline Links"] ? "underline" : "none") + ";\n}\n.backlink.dead {\n text-decoration: none;\n}\n" + (_conf["Filtered Backlinks"] ? ".filtered.backlink { display: none;}" : void 0) + "\n" + { "lower left": ".container { padding: 0 5px; max-width: 100%;}.reply.quoted { position: relative; padding-bottom: 1.7em;}.reply .container { position: absolute; left: 0; bottom: 0; padding: 0 5px;}.reply .container::before { content: 'REPLIES: ';}#qp .container { position: static; max-width: 100%;}#qp .container::before { content: '';}.inline .container { position: static; max-width: 100%;}.inline .container::before { content: '';}", 'lower right': ".reply.quoted { position: relative; padding-bottom: 1.7em;}.reply .container { position: absolute; right: 0; bottom: 0;}.container::before { content: 'REPLIES: ';}.container { max-width: 100%; padding: 0 5px;}#qp .container { position: static; max-width: 100%;}#qp .container::before { content: '';}.inline .container { position: static; float: none;}.inline .container::before { content: '';}", 'default': "" diff --git a/src/General/css/layout.css b/src/General/css/layout.css index b8e055608..d9fe410d7 100644 --- a/src/General/css/layout.css +++ b/src/General/css/layout.css @@ -802,7 +802,8 @@ hide: " display: inline-block; } "} -.expanded-image .reply.post { +.expanded-image .reply.post, +.hasInline .reply.post { display: inline-block; overflow: visible; clear: both; diff --git a/src/General/css/style.css b/src/General/css/style.css deleted file mode 100644 index fd78484be..000000000 --- a/src/General/css/style.css +++ /dev/null @@ -1,941 +0,0 @@ -/* General */ -.dialog { - box-shadow: 0 1px 2px rgba(0, 0, 0, .15); - border: 1px solid; - display: block; - padding: 0; -} -.captcha-img, -.field { - background-color: #FFF; - border: 1px solid #CCC; - -moz-box-sizing: border-box; - box-sizing: border-box; - color: #333; - font: 13px sans-serif; - outline: none; - transition: color .25s, border-color .25s; - transition: color .25s, border-color .25s; -} -.field::-moz-placeholder, -.field:hover::-moz-placeholder { - color: #AAA !important; - font-size: 13px !important; - opacity: 1.0 !important; -} -.captch-img:hover, -.field:hover { - border-color: #999; -} -.field:hover, .field:focus { - color: #000; -} -.field[disabled] { - background-color: #F2F2F2; - color: #888; -} -.move { - cursor: move; - overflow: hidden; -} -label, .favicon { - cursor: pointer; -} -a[href="javascript:;"] { - text-decoration: none; -} -.warning { - color: red; -} -#boardNavDesktop { - display: none !important; -} - -/* 4chan style fixes */ -.opContainer, .op { - display: block !important; - overflow: visible !important; -} -[hidden] { - display: none !important; -} - -/* fixed, z-index */ -#overlay, -#fourchanx-settings, -#qp, #ihover, -#navlinks, .fixed #header-bar, -#watcher, -:root.float #updater, -:root.float #thread-stats, -#qr { - position: fixed; -} -#fourchanx-settings { - z-index: 999; -} -#overlay { - z-index: 900; -} -#notifications { - z-index: 70; -} -#qp, #ihover { - z-index: 60; -} -#menu { - z-index: 50; -} -#navlinks, #updater, #thread-stats { - z-index: 40; -} -.fixed #header-bar.autohide { - z-index: 35; -} -#qr { - z-index: 30; -} -#watcher { - z-index: 20; -} -.fixed #header-bar { - z-index: 10; -} -/* Header */ -.fixed.top body { - padding-top: 2em; -} -.fixed.bottom body { - padding-bottom: 2em; -} -.fixed #header-bar { - right: 0; - left: 0; - padding: 3px 4px 4px; -} -.fixed.top #header-bar { - top: 0; -} -.fixed.bottom #header-bar { - bottom: 0; -} -#header-bar { - border-width: 0; - transition: all .1s .05s ease-in-out; -} -.fixed.top #header-bar { - border-bottom-width: 1px; -} -.fixed.bottom #header-bar { - box-shadow: 0 -1px 2px rgba(0, 0, 0, .15); - border-top-width: 1px; -} -.fixed.bottom #header-bar .menu-button i { - border-top: none; - border-bottom: 6px solid; -} -#board-list { - text-align: center; -} -.fixed #header-bar.autohide:not(:hover) { - box-shadow: none; - transition: all .8s .6s cubic-bezier(.55, .055, .675, .19); -} -.fixed.top #header-bar.autohide:not(:hover) { - margin-bottom: -1em; - -webkit-transform: translateY(-100%); - transform: translateY(-100%); -} -.fixed.bottom #header-bar.autohide:not(:hover) { - -webkit-transform: translateY(100%); - transform: translateY(100%); -} -#scroll-marker { - left: 0; - right: 0; - height: 10px; - position: absolute; -} -#header-bar #scroll-marker { - display: none; -} -.fixed #header-bar #scroll-marker { - display: block; -} -.fixed.top #header-bar #scroll-marker { - top: 100%; -} -.fixed.bottom #header-bar #scroll-marker { - bottom: 100%; -} -#header-bar a:not(.entry):not(.close) { - text-decoration: none; - padding: 1px; -} -#header-bar input { - margin: 0; - vertical-align: bottom; -} -#shortcuts:empty { - display: none; -} -.brackets-wrap::before { - content: "\\00a0["; -} -.brackets-wrap::after { - content: "]\\00a0"; -} -.disabled, -.expand-all-shortcut { - opacity: .45; -} -#shortcuts { - float: right; -} -#navbotright, -#navtopright { - display: none; -} -#toggleMsgBtn { - display: none !important; -} - -/* Notifications */ -#notifications { - position: fixed; - top: 0; - height: 0; - text-align: center; - right: 0; - left: 0; - transition: all .8s .6s cubic-bezier(.55, .055, .675, .19); -} -.fixed.top #header-bar #notifications { - position: absolute; - top: 100%; -} -.notification { - color: #FFF; - font-weight: 700; - text-shadow: 0 1px 2px rgba(0, 0, 0, .5); - box-shadow: 0 1px 2px rgba(0, 0, 0, .15); - border-radius: 2px; - margin: 1px auto; - width: 500px; - max-width: 100%; - position: relative; - transition: all .25s ease-in-out; -} -.notification.error { - background-color: hsla(0, 100%, 38%, .9); -} -.notification.warning { - background-color: hsla(36, 100%, 38%, .9); -} -.notification.info { - background-color: hsla(200, 100%, 38%, .9); -} -.notification.success { - background-color: hsla(104, 100%, 38%, .9); -} -.notification a { - color: white; -} -.notification > .close { - padding: 6px; - top: 0; - right: 5px; - position: absolute; -} -.message { - -moz-box-sizing: border-box; - box-sizing: border-box; - padding: 6px 20px; - max-height: 200px; - width: 100%; - overflow: auto; -} - -/* Settings */ -:root.fourchan-x body { - -moz-box-sizing: border-box; - box-sizing: border-box; -} -#overlay { - background-color: rgba(0, 0, 0, .5); - top: 0; - left: 0; - height: 100%; - width: 100%; -} -#fourchanx-settings { - -moz-box-sizing: border-box; - box-sizing: border-box; - box-shadow: 0 0 15px rgba(0, 0, 0, .15); - height: 600px; - min-height: 0; - max-height: 100%; - width: 900px; - min-width: 0; - max-width: 100%; - margin: auto; - padding: 3px; - top: 50%; - left: 50%; - -moz-transform: translate(-50%, -50%); - -webkit-transform: translate(-50%, -50%); - -o-transform: translate(-50%, -50%); - transform: translate(-50%, -50%); -} -#fourchanx-settings > nav { - padding: 2px 2px 0; - height: 15px; -} -#fourchanx-settings > nav a { - text-decoration: underline; -} -#fourchanx-settings > nav a.close { - text-decoration: none; - padding: 2px; -} -.section-container { - overflow: auto; - position: absolute; - top: 2.1em; - right: 5px; - bottom: 5px; - left: 5px; - padding-right: 5px; -} -.sections-list { - padding: 0 3px; - float: left; -} -.credits { - float: right; -} -.tab-selected { - font-weight: 700; -} -.section-sauce ul, -.section-advanced ul { - list-style: none; - margin: 0; -} -.section-sauce ul { - padding: 8px; -} -.section-advanced ul { - padding: 0px; -} -.section-sauce li, -.section-advanced li { - padding-left: 4px; -} -.section-main label { - text-decoration: underline; -} -.section-filter ul { - padding: 0; -} -.section-filter li { - margin: 10px 40px; -} -.section-filter textarea { - height: 500px; -} -.section-sauce textarea { - height: 350px; -} -.section-advanced .field[name="boardnav"] { - width: 100%; -} -.section-advanced textarea { - height: 150px; -} -#fourchanx-settings fieldset { - border: 1px solid; - border-radius: 3px; -} -#fourchanx-settings legend { - font-weight: 700; -} -#fourchanx-settings textarea { - font-family: monospace; - min-width: 100%; - max-width: 100%; -} -#fourchanx-settings code { - color: #000; - background-color: #FFF; - padding: 0 2px; -} -.unscroll { - overflow: hidden; -} - -/* Announcement Hiding */ -:root.hide-announcement #globalMessage { - display: none; -} -a.hide-announcement { - float: left; -} - -/* Unread */ -#unread-line { - margin: 0; - border-color: rgb(255,0,0); -} - -/* Thread Updater */ -#updater { - background: none; - border: none; - box-shadow: none; -} -#updater > .move { - padding: 5px 3px 0px; - margin-bottom: -3px; -} -#updater > div:last-child { - text-align: center; -} -#updater input[type=number] { - width: 4em; -} -:root.float #updater { - padding: 0px 3px; -} -.new { - color: limegreen; -} -#update-status.warning, #update-status.new { - margin-right: 5px; -} -#update-timer { - cursor: pointer; -} - -/* Thread Watcher */ -#watcher { - padding-bottom: 3px; - overflow: hidden; - white-space: nowrap; -} -#watcher:not(:hover) { - max-height: 220px; -} -#watcher > .move { - padding-top: 3px; -} -#watcher > div { - max-width: 200px; - overflow: hidden; - padding-left: 3px; - padding-right: 3px; - text-overflow: ellipsis; -} -#watcher a { - text-decoration: none; -} - -/* Thread Stats */ -#thread-stats { - background: none; - border: none; - box-shadow: none; -} -:root.float #post-count, :root.float #file-count { - pointer-events: none; -} -:root.float #thread-stats { - padding: 0px 3px; -} - -/* Quote */ -.deadlink { - text-decoration: none !important; -} -.backlink.deadlink:not(.forwardlink), .quotelink.deadlink:not(.forwardlink) { - text-decoration: underline !important; -} -.inlined { - opacity: .5; -} -#qp input, .forwarded { - display: none; -} -.quotelink.forwardlink, -.backlink.forwardlink { - text-decoration: none; - border-bottom: 1px dashed; -} -.filtered { - text-decoration: underline line-through; -} -.inline { - border: 1px solid; - display: table; - margin: 2px 0; -} -.inline .post { - border: 0 !important; - background-color: transparent !important; - display: table !important; - margin: 0 !important; - padding: 1px 2px !important; -} -#qp > .opContainer::after { - content: ''; - clear: both; - display: table; -} -#qp .post { - border: none; - margin: 0; - padding: 2px 2px 5px; -} -#qp img { - max-height: 300px; - max-width: 500px; - max-height: 80vh; - max-width: 50vw; -} -.qphl { - outline: 2px solid rgba(216, 94, 49, .7); -} -.highlight-own .yourPost>.reply { - border-left: 2px solid rgba(221,0,0,.5); -} -/* Quote Threading */ -.threadContainer { - margin-left: 20px; - border-left: 1px solid rgba(128,128,128,.3); -} -.threadOP { - clear: both; -} - -/* File */ -.fileText:hover .fntrunc, -.fileText:not(:hover) .fnfull, -.expanded-image > .post > .file > .fileThumb > img[data-md5], -:not(.expanded-image) > .post > .file > .fileThumb > .full-image { - display: none; -} -.expanding { - opacity: .5; -} -.expanded-image { - clear: both; -} -.expanded-image > .op > .file::after { - content: ''; - clear: both; - display: table; -} -:root.fit-width .full-image { - max-width: 100%; -} -:root.gecko.fit-width .full-image, -:root.presto.fit-width .full-image { - width: 100%; -} -#ihover { - -moz-box-sizing: border-box; - box-sizing: border-box; - max-height: 100%; - max-width: 75%; - padding-bottom: 16px; -} -.fappeTyme .thread > .noFile, -.fappeTyme .threadContainer > .noFile { - display: none; -} - -/* Index/Reply Navigation */ -#navlinks { - font-size: 16px; - top: 25px; - right: 10px; -} - -/* Filter */ -.opContainer.filter-highlight { - box-shadow: inset 5px 0 rgba(255, 0, 0, .5); -} -.filter-highlight > .reply { - box-shadow: -5px 0 rgba(255, 0, 0, .5); -} - -/* Thread & Reply Hiding */ -.hide-thread-button, -.hide-reply-button { - float: left; - margin-right: 2px; -} -.stub ~ * { - display: none !important; -} -.stub input { - display: inline-block; -} - -/* QR */ -:root.hide-original-post-form #postForm, -:root.hide-original-post-form .postingMode, -:root.hide-original-post-form #togglePostForm, -#qr.autohide:not(.has-focus):not(:hover) > form, -.postingMode ~ #qr select, -#file-n-submit:not(.has-file) #qr-filerm { - display: none; -} -#qr select, #dump-button, .remove, .captcha-img { - cursor: pointer; -} -#qr { - z-index: 20; - position: fixed; - padding: 1px; - border: 1px solid transparent; - min-width: 248px; - border-radius: 3px 3px 0 0; -} -#qrtab { - border-radius: 3px 3px 0 0; -} -#qrtab { - margin-bottom: 1px; -} -#qr .close { - float: right; - padding: 0 3px; -} -#qr .warning { - min-height: 1.6em; - vertical-align: middle; - padding: 0 1px; - border-width: 1px; - border-style: solid; -} -.qr-link { - text-align: center; -} -.persona { - width: 248px; - max-width: 100%; - min-width: 100%; -} -#dump-button { - background: linear-gradient(#EEE, #CCC); - border: 1px solid #CCC; - width: 10%; - margin: 0; - font: 13px sans-serif; - padding: 1px 0px 2px; -} -.persona .field:not(#dump) { - width: 95px; - min-width: 30%; - max-width: 30%; -} -#qr textarea.field { - height: 14.8em; - min-height: 9em; -} -#qr.has-captcha textarea.field { - height: 9em; -} -input.field.tripped:not(:hover):not(:focus) { - color: transparent !important; text-shadow: none !important; -} -#qr textarea { - resize: both; -} -.captcha-img { - margin: 0px; - text-align: center; - background-image: #fff; - font-size: 0px; - min-height: 59px; - min-width: 302px; -} -.captcha-input { - width: 100%; - margin: 1px 0 0; -} -.field { - -moz-box-sizing: border-box; - margin: 0px; - padding: 2px 4px 3px; -} -#qr textarea { - min-width: 100%; -} -#qr [type='submit'] { - width: 25%; - vertical-align: top; -} -/* Fake File Input */ -#qr-filename, -.has-file #qr-no-file { - display: none; -} -#qr-no-file, -.has-file #qr-filename { - display: block; - padding: 0px 4px; - margin-bottom: 2px; - overflow: hidden; - text-overflow: ellipsis; -} -#qr-no-file { - color: #AAA; -} -#qr-filename-container { - -moz-box-sizing: border-box; - display: inline-block; - position: relative; - width: 100px; - min-width: 74.6%; - max-width: 74.6%; - margin-right: 0.4%; - margin-top: 1px; - overflow: hidden; - padding: 2px 1px 0; - height: 22px; -} -#qr-filename-container:hover { - cursor: text; -} -#qr-filerm { - position: relative; - right: 14px; - bottom: 6px; - margin-right: -8px; - z-index: 2; -} -#file-n-submit { - height: 23px; -} -#qr input[type=file] { - display: none; -} -/* Thread Select / Spoiler Label */ -#qr select { - float: right; -} -/* Dumping UI */ -.dump #dump-list-container { - display: block; -} -#dump-list-container { - display: none; - position: relative; - overflow-y: hidden; - margin-top: 1px; -} -#dump-list { - overflow-x: auto; - overflow-y: hidden; - white-space: pre; - width: 248px; - max-width: 100%; - min-width: 100%; -} -#dump-list:hover { - overflow-x: auto; -} -.qr-preview { - -moz-box-sizing: border-box; - counter-increment: thumbnails; - cursor: move; - display: inline-block; - height: 90px; - width: 90px; - padding: 2px; - opacity: .5; - overflow: hidden; - position: relative; - text-shadow: 0 1px 1px #000; - -moz-transition: opacity .25s ease-in-out; - vertical-align: top; -} -.qr-preview:hover, -.qr-preview:focus { - opacity: .9; -} -.qr-preview::before { - content: counter(thumbnails); - color: #fff; - position: absolute; - top: 3px; - right: 3px; - text-shadow: 0 0 3px #000, 0 0 8px #000; -} -.qr-preview#selected { - opacity: 1; -} -.qr-preview.drag { - box-shadow: 0 0 10px rgba(0,0,0,.5); -} -.qr-preview.over { - border-color: #fff; -} -.qr-preview > span { - color: #fff; -} -.remove { - background: none; - color: #e00; - font-weight: 700; - padding: 3px; -} -a:only-of-type > .remove { - display: none; -} -.remove:hover::after { - content: " Remove"; -} -.qr-preview > label { - background: rgba(0,0,0,.5); - color: #fff; - right: 0; bottom: 0; left: 0; - position: absolute; - text-align: center; -} -.qr-preview > label > input { - margin: 0; -} -#add-post { - cursor: pointer; - font-size: 2em; - position: absolute; - top: 50%; - right: 10px; - -moz-transform: translateY(-50%); -} -.textarea { - position: relative; -} -#char-count { - color: #000; - background: hsla(0, 0%, 100%, .5); - font-size: 8pt; - position: absolute; - bottom: 1px; - right: 1px; - pointer-events: none; -} - -/* Menu */ -.menu-button { - display: inline-block; - position: relative; - cursor: pointer; -} -.menu-button i { - border-top: 6px solid; - border-right: 4px solid transparent; - border-left: 4px solid transparent; - display: inline-block; - margin: 2px; - vertical-align: middle; -} -#menu { - position: fixed; - outline: none; -} -.entry { - border-bottom: 1px solid rgba(0,0,0,.25); - cursor: pointer; - display: block; - outline: none; - padding: 3px 7px; - position: relative; - text-decoration: none; - white-space: nowrap; -} -.left>.entry.has-submenu { - padding-right: 17px !important; -} -.entry:last-child { - border-bottom: 0; -} -.has-submenu::after { - content: ""; - border-left: .5em solid; - border-top: .3em solid transparent; - border-bottom: .3em solid transparent; - display: inline-block; - margin: .3em; - position: absolute; - right: 3px; -} -.left .has-submenu::after { - border-left: 0; - border-right: .5em solid; -} -.submenu { - display: none; - position: absolute; - left: 100%; - top: -1px; -} -.focused .submenu { - display: block; -} -.imp-exp-result { - position: absolute; - text-align: center; - margin: auto; - right: 0px; - left: 0px; - width: 200px; -} -.export, .import { - cursor: pointer; - text-decoration: none !important; -} -/* Link Title Favicons */ -.linkify.YouTube { - background: transparent url('data:image/png;base64,<%= grunt.file.read("src/General/img/links/youtube.png", {encoding: "base64"}) %>') center left no-repeat!important; - padding-left: 18px; -} -.linkify.Vimeo { - background: transparent url('data:image/png;base64,<%= grunt.file.read("src/General/img/links/vimeo.png", {encoding: "base64"}) %>') center left no-repeat!important; - padding-left: 18px; -} -.linkify.SoundCloud { - background: transparent url('data:image/png;base64,<%= grunt.file.read("src/General/img/links/soundcloud.png", {encoding: "base64"}) %>') center left no-repeat!important; - padding-left: 18px; -} -.linkify.audio { - background: transparent url('data:image/png;base64,<%= grunt.file.read("src/General/img/links/audio.png", {encoding: "base64"}) %>') center left no-repeat!important; - padding-left: 18px; -} -.linkify.LiveLeak { - background: transparent url('data:image/png;base64,<%= grunt.file.read("src/General/img/links/liveleak.png", {encoding: "base64"}) %>') center left no-repeat!important; - padding-left: 18px; -} -.linkify.Vocaroo { - background: transparent url('data:image/png;base64,<%= grunt.file.read("src/General/img/links/vocaroo.png", {encoding: "base64"}) %>') center left no-repeat!important; - padding-left: 18px; -} -.linkify.pastebin { - background: transparent url('data:image/png;base64,<%= grunt.file.read("src/General/img/links/pastebin.png", {encoding: "base64"}) %>') center left no-repeat!important; - padding-left: 18px; -} -.linkify.gist { - background: transparent url('data:image/png;base64,<%= grunt.file.read("src/General/img/links/gist.png", {encoding: "base64"}) %>') center left no-repeat!important; - padding-left: 18px; -} -.linkify.image { - background: transparent url('data:image/png;base64,<%= grunt.file.read("src/General/img/links/image.png", {encoding: "base64"}) %>') center left no-repeat!important; - padding-left: 18px; -} -.linkify.InstallGentoo { - background: transparent url('data:image/png;base64,<%= grunt.file.read("src/General/img/links/installgentoo.png", {encoding: "base64"}) %>') center left no-repeat!important; - padding-left: 18px; -} \ No newline at end of file diff --git a/src/Quotelinks/QuoteInline.coffee b/src/Quotelinks/QuoteInline.coffee index c7541aa4a..41f5c3c82 100644 --- a/src/Quotelinks/QuoteInline.coffee +++ b/src/Quotelinks/QuoteInline.coffee @@ -8,10 +8,12 @@ QuoteInline = Post::callbacks.push name: 'Quote Inlining' cb: @node + node: -> for link in @nodes.quotelinks.concat [@nodes.backlinks...] $.on link, 'click', QuoteInline.toggle return + toggle: (e) -> return if e.shiftKey or e.altKey or e.ctrlKey or e.metaKey or e.button isnt 0 e.preventDefault() @@ -29,12 +31,18 @@ QuoteInline = quotelink.parentNode.parentNode else $.x 'ancestor-or-self::*[parent::blockquote][1]', quotelink + add: (quotelink, boardID, threadID, postID, context) -> isBacklink = $.hasClass quotelink, 'backlink' inline = $.el 'div', id: "i#{postID}" className: 'inline' - $.after QuoteInline.findRoot(quotelink, isBacklink), inline + root = QuoteInline.findRoot(quotelink, isBacklink) + $.after root, inline + + qroot = $.x 'ancestor::*[contains(@class,"postContainer")][1]', root + + $.addClass qroot, 'hasInline' Get.postClone boardID, threadID, postID, inline, context return unless (post = g.posts["#{boardID}.#{postID}"]) and @@ -56,8 +64,12 @@ QuoteInline = # Select the corresponding inlined quote, and remove it. root = QuoteInline.findRoot quotelink, isBacklink root = $.x "following-sibling::div[@id='i#{postID}'][1]", root + qroot = $.x 'ancestor::*[contains(@class,"postContainer")][1]', root $.rm root + unless $ '.inline', qroot + $.rmClass qroot, 'hasInline' + # Stop if it only contains text. return unless el = root.firstElementChild