summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Foster <savetheinternet@tinyboard.org>2013-09-15 10:42:50 +1000
committerMichael Foster <savetheinternet@tinyboard.org>2013-09-15 10:42:50 +1000
commit8dd1a3e3e870ca02bd9567b197b0cd9c5f4fb285 (patch)
tree38652443a4ab3308c79a60dac42292ace0e7f161
parent41a3f9be258c0ec5668e9f1b923f39e08a9caca2 (diff)
wait for stylesheet to load?
-rw-r--r--js/quick-reply.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/js/quick-reply.js b/js/quick-reply.js
index a35047aa..c190d6d4 100644
--- a/js/quick-reply.js
+++ b/js/quick-reply.js
@@ -85,8 +85,6 @@ var do_css = function() {
}\
}\
</style>').appendTo($('head'));
-
- console.log('h');
};
var show_quick_reply = function(){
@@ -206,7 +204,12 @@ var show_quick_reply = function(){
$postForm.fadeOut(100);
else
$postForm.fadeIn(100);
- }).on('stylesheet', do_css);
+ }).on('stylesheet', function() {
+ do_css();
+ if ($('link#stylesheet').attr('href')) {
+ $('link#stylesheet')[0].onload = do_css;
+ }
+ });
};
$(window).on('cite', function(e, id, with_link) {