-g.THREAD_ID
This commit is contained in:
parent
8245ecba83
commit
cb10ce14c6
@ -913,7 +913,7 @@
|
||||
if (QR.qr) {
|
||||
return $('textarea', QR.qr).focus();
|
||||
} else {
|
||||
return QR.dialog('', g.THREAD_ID || thread.firstChild.id);
|
||||
return QR.dialog('', thread != null ? thread.firstChild.id : void 0);
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -1436,15 +1436,15 @@
|
||||
return QR.submit();
|
||||
},
|
||||
quote: function(e, blank) {
|
||||
var i, id, qr, s, sel, ss, ta, text, tid, v, _ref;
|
||||
var i, id, qr, s, sel, ss, ta, text, tid, v, _ref, _ref2;
|
||||
if (e != null) {
|
||||
e.preventDefault();
|
||||
}
|
||||
tid = g.THREAD_ID || $.x('ancestor::div[@class="thread"]/div', this).id;
|
||||
tid = (_ref = $.x('ancestor::div[@class="thread"]/div', this)) != null ? _ref.id : void 0;
|
||||
id = this.textContent;
|
||||
text = ">>" + id + "\n";
|
||||
sel = getSelection();
|
||||
if (id === ((_ref = $.x('preceding::input[@type="checkbox"][1]', sel.anchorNode)) != null ? _ref.name : void 0)) {
|
||||
if (id === ((_ref2 = $.x('preceding::input[@type="checkbox"][1]', sel.anchorNode)) != null ? _ref2.name : void 0)) {
|
||||
if (s = sel.toString().replace(/\n/g, '\n>')) {
|
||||
text += ">" + s + "\n";
|
||||
}
|
||||
|
||||
@ -656,7 +656,7 @@ keybinds =
|
||||
if QR.qr
|
||||
$('textarea', QR.qr).focus()
|
||||
else
|
||||
QR.dialog '', g.THREAD_ID or thread.firstChild.id
|
||||
QR.dialog '', thread?.firstChild.id
|
||||
|
||||
open: (thread, tab) ->
|
||||
id = thread.firstChild.id
|
||||
@ -1145,7 +1145,7 @@ QR =
|
||||
QR.submit() #derpy, but prevents checking for content twice
|
||||
quote: (e, blank) ->
|
||||
e?.preventDefault()
|
||||
tid = g.THREAD_ID or $.x('ancestor::div[@class="thread"]/div', @).id
|
||||
tid = $.x('ancestor::div[@class="thread"]/div', @)?.id
|
||||
id = @textContent
|
||||
text = ">>#{id}\n"
|
||||
sel = getSelection()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user