quote keybind
This commit is contained in:
parent
ee040e52ad
commit
37f8c16c88
@ -907,17 +907,19 @@
|
||||
}
|
||||
},
|
||||
qr: function(thread, quote) {
|
||||
var qrLink;
|
||||
var qrLink, tid;
|
||||
if (!(qrLink = $('td.replyhl span[id] a:not(:first-child)', thread))) {
|
||||
qrLink = $("span[id^=nothread] a:not(:first-child)", thread);
|
||||
}
|
||||
tid = g.THREAD_ID || thread.firstChild.id;
|
||||
if (quote) {
|
||||
return qr.quote.call(qrLink);
|
||||
return QR.quote.call(qrLink);
|
||||
} else {
|
||||
if (!qr.el) {
|
||||
qr.dialog(qrLink);
|
||||
if (QR.qr) {
|
||||
return $('textarea', QR.qr).focus();
|
||||
} else {
|
||||
return QR.dialog('', tid);
|
||||
}
|
||||
return $('textarea', qr.el).focus();
|
||||
}
|
||||
},
|
||||
open: function(thread, tab) {
|
||||
@ -1405,9 +1407,11 @@
|
||||
e.preventDefault();
|
||||
return QR.submit();
|
||||
},
|
||||
quote: function(e) {
|
||||
quote: function(e, blank) {
|
||||
var i, id, qr, s, sel, ss, ta, text, tid, v, _ref;
|
||||
e.preventDefault();
|
||||
if (e != null) {
|
||||
e.preventDefault();
|
||||
}
|
||||
tid = g.THREAD_ID || $.x('ancestor::div[@class="thread"]/div', this).id;
|
||||
id = this.textContent;
|
||||
text = ">>" + id + "\n";
|
||||
|
||||
@ -652,13 +652,14 @@ keybinds =
|
||||
qr: (thread, quote) ->
|
||||
unless qrLink = $ 'td.replyhl span[id] a:not(:first-child)', thread
|
||||
qrLink = $ "span[id^=nothread] a:not(:first-child)", thread
|
||||
|
||||
tid = g.THREAD_ID or thread.firstChild.id
|
||||
if quote
|
||||
qr.quote.call qrLink
|
||||
QR.quote.call qrLink
|
||||
else
|
||||
unless qr.el
|
||||
qr.dialog qrLink
|
||||
$('textarea', qr.el).focus()
|
||||
if QR.qr
|
||||
$('textarea', QR.qr).focus()
|
||||
else
|
||||
QR.dialog '', tid
|
||||
|
||||
open: (thread, tab) ->
|
||||
id = thread.firstChild.id
|
||||
@ -1107,8 +1108,8 @@ QR =
|
||||
QR.captchaPush @
|
||||
e.preventDefault()
|
||||
QR.submit() #derpy, but prevents calling QR.hasContent twice
|
||||
quote: (e) ->
|
||||
e.preventDefault()
|
||||
quote: (e, blank) ->
|
||||
e?.preventDefault()
|
||||
tid = g.THREAD_ID or $.x('ancestor::div[@class="thread"]/div', @).id
|
||||
id = @textContent
|
||||
text = ">>#{id}\n"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user