diff --git a/js/quick-reply.js b/js/quick-reply.js index db0903f7..a35047aa 100644 --- a/js/quick-reply.js +++ b/js/quick-reply.js @@ -11,19 +11,21 @@ * */ -var show_quick_reply = function(){ - if($('div.banner').length == 0) - return; - if($('#quick-reply').length != 0) - return; - - $('').appendTo($('head')); + console.log('h'); +}; + +var show_quick_reply = function(){ + if($('div.banner').length == 0) + return; + if($('#quick-reply').length != 0) + return; + + do_css(); + var $postForm = $('form[name="post"]').clone(); $postForm.clone(); @@ -193,7 +206,7 @@ var show_quick_reply = function(){ $postForm.fadeOut(100); else $postForm.fadeIn(100); - }); + }).on('stylesheet', do_css); }; $(window).on('cite', function(e, id, with_link) { diff --git a/templates/main.js b/templates/main.js index a395852a..984b1976 100644 --- a/templates/main.js +++ b/templates/main.js @@ -67,6 +67,9 @@ function changeStyle(styleName, link) { if (link) { link.className = 'selected'; } + + if (typeof $ != 'undefined') + $(window).trigger('stylesheet', styleName); } @@ -198,7 +201,7 @@ function citeReply(id, with_link) { // ??? body.value += '>>' + id + '\n'; } - if ($) { + if (typeof $ != 'undefined') { $(window).trigger('cite', [id, with_link]); $(body).change(); }