Fix wrong parentheses. Don't try to show crossquotes. Fix parsing on missing quote preview. Avoid errors when removing an inlined crossquote.
This commit is contained in:
parent
4bb12bf23f
commit
0fbef75a61
@ -1853,7 +1853,7 @@
|
|||||||
init: function() {
|
init: function() {
|
||||||
return g.callbacks.push(function(root) {
|
return g.callbacks.push(function(root) {
|
||||||
var board, img, nb, _, _ref;
|
var board, img, nb, _, _ref;
|
||||||
if (!(img = $('img[alt^=Spoiler]', root) || root.className === 'inline')) {
|
if (!(img = $('img[alt^=Spoiler]', root)) || root.className === 'inline') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
img.removeAttribute('height');
|
img.removeAttribute('height');
|
||||||
@ -2040,7 +2040,7 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
toggle: function(e) {
|
toggle: function(e) {
|
||||||
var el, id, inline, inlined, pathname, root, table, threadID, _i, _len, _ref;
|
var el, hidden, id, inline, inlined, pathname, root, table, threadID, _i, _len, _ref;
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
id = this.hash.slice(1);
|
id = this.hash.slice(1);
|
||||||
if (table = $("#i" + id, $.x('ancestor::td[1]', this))) {
|
if (table = $("#i" + id, $.x('ancestor::td[1]', this))) {
|
||||||
@ -2049,7 +2049,9 @@
|
|||||||
_ref = $$('input', table);
|
_ref = $$('input', table);
|
||||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
inlined = _ref[_i];
|
inlined = _ref[_i];
|
||||||
$.show($.x('ancestor::table[1]', d.getElementById(inlined.name)));
|
if (hidden = d.getElementById(inlined.name)) {
|
||||||
|
$.show($.x('ancestor::table[1]', hidden));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -2079,6 +2081,9 @@
|
|||||||
},
|
},
|
||||||
parse: function(req, pathname, id, threadID, inline) {
|
parse: function(req, pathname, id, threadID, inline) {
|
||||||
var body, html, newInline, op, quote, reply, _i, _j, _len, _len2, _ref, _ref2;
|
var body, html, newInline, op, quote, reply, _i, _j, _len, _len2, _ref, _ref2;
|
||||||
|
if (!inline.parentNode) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (req.status !== 200) {
|
if (req.status !== 200) {
|
||||||
inline.innerHTML = "" + req.status + " " + req.statusText;
|
inline.innerHTML = "" + req.status + " " + req.statusText;
|
||||||
return;
|
return;
|
||||||
@ -2177,8 +2182,7 @@
|
|||||||
},
|
},
|
||||||
parse: function(req, id, threadID) {
|
parse: function(req, id, threadID) {
|
||||||
var body, html, op, qp, reply, _i, _len, _ref;
|
var body, html, op, qp, reply, _i, _len, _ref;
|
||||||
qp = $('#qp');
|
if (!(qp = ui.el || ui.el.innerHTML === ("Loading " + id + "..."))) {
|
||||||
if (qp.innerHTML !== ("Loading " + id + "...")) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (req.status !== 200) {
|
if (req.status !== 200) {
|
||||||
|
|||||||
@ -1483,7 +1483,7 @@ sauce =
|
|||||||
revealSpoilers =
|
revealSpoilers =
|
||||||
init: ->
|
init: ->
|
||||||
g.callbacks.push (root) ->
|
g.callbacks.push (root) ->
|
||||||
return if not img = $('img[alt^=Spoiler]', root) or root.className is 'inline'
|
return if not (img = $ 'img[alt^=Spoiler]', root) or root.className is 'inline'
|
||||||
img.removeAttribute 'height'
|
img.removeAttribute 'height'
|
||||||
img.removeAttribute 'width'
|
img.removeAttribute 'width'
|
||||||
[_, board, nb] = img.parentNode.href.match /(\w+)\/src\/(\d+)/
|
[_, board, nb] = img.parentNode.href.match /(\w+)\/src\/(\d+)/
|
||||||
@ -1602,7 +1602,8 @@ quoteInline =
|
|||||||
$.rm table
|
$.rm table
|
||||||
$.removeClass @, 'inlined'
|
$.removeClass @, 'inlined'
|
||||||
for inlined in $$ 'input', table
|
for inlined in $$ 'input', table
|
||||||
$.show $.x 'ancestor::table[1]', d.getElementById inlined.name
|
if hidden = d.getElementById inlined.name
|
||||||
|
$.show $.x 'ancestor::table[1]', hidden
|
||||||
return
|
return
|
||||||
root = if @parentNode.nodeName is 'FONT' then @parentNode else if @nextSibling then @nextSibling else @
|
root = if @parentNode.nodeName is 'FONT' then @parentNode else if @nextSibling then @nextSibling else @
|
||||||
if el = d.getElementById id
|
if el = d.getElementById id
|
||||||
@ -1623,6 +1624,8 @@ quoteInline =
|
|||||||
$.cache pathname, (-> quoteInline.parse @, pathname, id, threadID, inline)
|
$.cache pathname, (-> quoteInline.parse @, pathname, id, threadID, inline)
|
||||||
$.addClass @, 'inlined'
|
$.addClass @, 'inlined'
|
||||||
parse: (req, pathname, id, threadID, inline) ->
|
parse: (req, pathname, id, threadID, inline) ->
|
||||||
|
return unless inline.parentNode
|
||||||
|
|
||||||
if req.status isnt 200
|
if req.status isnt 200
|
||||||
inline.innerHTML = "#{req.status} #{req.statusText}"
|
inline.innerHTML = "#{req.status} #{req.statusText}"
|
||||||
return
|
return
|
||||||
@ -1681,8 +1684,7 @@ quotePreview =
|
|||||||
$.removeClass el, 'qphl' if el = d.getElementById @hash[1..]
|
$.removeClass el, 'qphl' if el = d.getElementById @hash[1..]
|
||||||
ui.hoverend()
|
ui.hoverend()
|
||||||
parse: (req, id, threadID) ->
|
parse: (req, id, threadID) ->
|
||||||
qp = $ '#qp'
|
return unless qp = ui.el or ui.el.innerHTML is "Loading #{id}..."
|
||||||
return unless qp.innerHTML is "Loading #{id}..."
|
|
||||||
|
|
||||||
if req.status isnt 200
|
if req.status isnt 200
|
||||||
qp.innerHTML = "#{req.status} #{req.statusText}"
|
qp.innerHTML = "#{req.status} #{req.statusText}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user