diff options
| author | Michael Foster <savetheinternet@tinyboard.org> | 2013-09-15 07:31:05 +1000 |
|---|---|---|
| committer | Michael Foster <savetheinternet@tinyboard.org> | 2013-09-15 07:31:05 +1000 |
| commit | c8f2f00320dd90ff51dec4de0286a9415aba4b0b (patch) | |
| tree | a8165f2f7a2e67525b234bd0a1c1d9841520adb9 /js | |
| parent | 9a8cebe4a1c298b3d6ff13332a2daded90506d3c (diff) | |
fix bug with quick-reply and make it nicer
Diffstat (limited to 'js')
| -rw-r--r-- | js/quick-reply.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/js/quick-reply.js b/js/quick-reply.js index 3ff6002c..6f5c79d8 100644 --- a/js/quick-reply.js +++ b/js/quick-reply.js @@ -13,7 +13,9 @@ var show_quick_reply = function(){ if($('div.banner').length == 0) - return; // not index + return; + if($('#quick-reply').length != 0) + return; $('<style type="text/css">\ #quick-reply {\ @@ -148,7 +150,14 @@ var show_quick_reply = function(){ }); }; -$(window).on('cite', function() { +$(window).on('cite', function(e, id, with_link) { show_quick_reply(); $('#quick-reply textarea').focus(); + if (with_link) { + console.log(id, with_link); + setTimeout(function() { + highlightReply(id); + $(window).scrollTop($('#' + id).offset().top); + }, 10); + } }); |
