Function, make sauce work without ++unread
This commit is contained in:
parent
ef6937f689
commit
696b25c290
17
4chan_x.js
17
4chan_x.js
@ -1595,7 +1595,7 @@
|
||||
cb: {
|
||||
node: function(root) {
|
||||
var i, link, names, prefix, prefixes, s, span, suffix, _len, _results;
|
||||
if (root.className === 'inline') {
|
||||
if (root.className === 'inline' && root.className !== 'crossquote') {
|
||||
return;
|
||||
}
|
||||
prefixes = (function() {
|
||||
@ -1745,10 +1745,7 @@
|
||||
return;
|
||||
}
|
||||
if (el = d.getElementById(id)) {
|
||||
inline = $.el('table', {
|
||||
className: 'inline',
|
||||
innerHTML: "<tbody><tr><td class=reply id=i" + id + ">" + el.innerHTML + "</td></tr></tbody>"
|
||||
});
|
||||
inline = quoteInline.table(id, el.innerHTML);
|
||||
if (this.className === 'backlink') {
|
||||
$.after($('td > br:first-of-type, td > a:last-of-type', this.parentNode), inline);
|
||||
return $.hide($.x('ancestor::table[1]', el));
|
||||
@ -1795,11 +1792,15 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
newInline = $.el('table', {
|
||||
newInline = quoteInline.table(id, html);
|
||||
$.addClass(newInline, 'crossquote');
|
||||
return $.replace(inline, newInline);
|
||||
},
|
||||
table: function(id, html) {
|
||||
return $.el('table', {
|
||||
className: 'inline',
|
||||
innerHTML: "<tbody><tr><td class=reply id=i" + id + ">" + html + "</td></tr></tbody>"
|
||||
});
|
||||
$.replace(inline, newInline);
|
||||
return newInline.className = 'inline';
|
||||
}
|
||||
};
|
||||
quotePreview = {
|
||||
|
||||
@ -1306,7 +1306,7 @@ sauce =
|
||||
g.callbacks.push sauce.cb.node
|
||||
cb:
|
||||
node: (root) ->
|
||||
return if root.className is 'inline'
|
||||
return if root.className is 'inline' and root.className isnt 'crossquote'
|
||||
prefixes = (s for s in ($.config('flavors').split '\n') when s[0] != '#')
|
||||
names = (prefix.match(/(\w+)\./)[1] for prefix in prefixes)
|
||||
if span = $ 'span.filesize', root
|
||||
@ -1394,9 +1394,7 @@ quoteInline =
|
||||
$.show $.x 'ancestor::table[1]', d.getElementById id
|
||||
return
|
||||
if el = d.getElementById id
|
||||
inline = $.el 'table',
|
||||
className: 'inline'
|
||||
innerHTML: "<tbody><tr><td class=reply id=i#{id}>#{el.innerHTML}</td></tr></tbody>"
|
||||
inline = quoteInline.table id, el.innerHTML
|
||||
if @className is 'backlink'
|
||||
$.after $('td > br:first-of-type, td > a:last-of-type', @parentNode), inline
|
||||
$.hide $.x 'ancestor::table[1]', el
|
||||
@ -1430,10 +1428,13 @@ quoteInline =
|
||||
if reply.id == id
|
||||
html = reply.innerHTML
|
||||
break
|
||||
newInline = $.el 'table',
|
||||
innerHTML: "<tbody><tr><td class=reply id=i#{id}>#{html}</td></tr></tbody>"
|
||||
newInline = quoteInline.table id, html
|
||||
$.addClass newInline, 'crossquote'
|
||||
$.replace inline, newInline
|
||||
newInline.className = 'inline'
|
||||
table: (id, html) ->
|
||||
$.el 'table',
|
||||
className: 'inline'
|
||||
innerHTML: "<tbody><tr><td class=reply id=i#{id}>#{html}</td></tr></tbody>"
|
||||
|
||||
quotePreview =
|
||||
init: ->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user