Automatically pick threads to reply to. Finish keybinds.

This commit is contained in:
Nicolas Stepien 2012-01-02 02:08:12 +01:00
parent 7e6f3ff09e
commit 4e2f3efef6
2 changed files with 12 additions and 0 deletions

View File

@ -1053,6 +1053,7 @@
} else {
qr.open();
}
if (!g.REPLY) qr.pickThread(thread.firstChild.id);
return $('textarea', qr.el).focus();
},
open: function(thread, tab) {
@ -1236,10 +1237,16 @@
cleanError: function() {
return $('.error', qr.el).textContent = null;
},
pickThread: function(thread) {
return $('select', qr.el).value = thread;
},
quote: function(e) {
var caretPos, id, s, sel, ta, text, _ref;
if (e != null) e.preventDefault();
qr.open();
if (!g.REPLY) {
qr.pickThread($.x('ancestor::div[@class="thread"]/div', this).id);
}
id = this.textContent;
text = ">>" + id + "\n";
sel = window.getSelection();

View File

@ -747,6 +747,7 @@ keybinds =
qr.quote.call $ '.quotejs + .quotejs', $('.replyhl', thread) or thread
else
qr.open()
qr.pickThread thread.firstChild.id unless g.REPLY
$('textarea', qr.el).focus()
open: (thread, tab) ->
@ -901,9 +902,13 @@ qr =
cleanError: ->
$('.error', qr.el).textContent = null
pickThread: (thread) ->
$('select', qr.el).value = thread
quote: (e) ->
e?.preventDefault()
qr.open()
qr.pickThread $.x('ancestor::div[@class="thread"]/div', @).id unless g.REPLY
id = @textContent
text = ">>#{id}\n"