summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
author8chan <admin@8chan.co>2014-11-12 01:19:02 -0800
committerczaks <marcin@6irc.net>2015-04-10 15:35:25 +0200
commit1aa8f6251d30545242768bf13bbe9ee89c231ca7 (patch)
treedae7b5014c1578fd8b27e4dee2fc6d08a02e9e62 /js
parent8d451280306c4f05ebb966399420ae4f08831965 (diff)
Have to load onready
Diffstat (limited to 'js')
-rw-r--r--js/thread-stats.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/thread-stats.js b/js/thread-stats.js
index 59fed912..4050fb67 100644
--- a/js/thread-stats.js
+++ b/js/thread-stats.js
@@ -8,8 +8,9 @@
* $config['additional_javascript'][] = 'js/thread-stats.js';
*/
if (active_page == 'thread') {
+$(document).ready(function(){
//check if page uses unique ID
- var IDsupport = ($('.poster_id').length > 0);
+ var IDsupport = ($('.poster_id').length > 0);
var thread_id = (document.location.pathname + document.location.search).split('/');
thread_id = thread_id[thread_id.length -1].split('+')[0].split('.')[0];
@@ -100,10 +101,9 @@ if (active_page == 'thread') {
if (!found) $('#thread_stats_page').css('color','red');
});
},30000);
- $(document).ready(function(){
$('body').append('<style>.posts_by_id{display:none;}.poster_id:hover+.posts_by_id{display:initial}</style>');
update_thread_stats();
$('#update_thread').click(update_thread_stats);
$(document).on('new_post',update_thread_stats);
- });
-} \ No newline at end of file
+});
+}