Have to load onready
This commit is contained in:
parent
8d45128030
commit
1aa8f6251d
@ -8,6 +8,7 @@
|
|||||||
* $config['additional_javascript'][] = 'js/thread-stats.js';
|
* $config['additional_javascript'][] = 'js/thread-stats.js';
|
||||||
*/
|
*/
|
||||||
if (active_page == 'thread') {
|
if (active_page == 'thread') {
|
||||||
|
$(document).ready(function(){
|
||||||
//check if page uses unique ID
|
//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('/');
|
var thread_id = (document.location.pathname + document.location.search).split('/');
|
||||||
@ -100,10 +101,9 @@ if (active_page == 'thread') {
|
|||||||
if (!found) $('#thread_stats_page').css('color','red');
|
if (!found) $('#thread_stats_page').css('color','red');
|
||||||
});
|
});
|
||||||
},30000);
|
},30000);
|
||||||
$(document).ready(function(){
|
|
||||||
$('body').append('<style>.posts_by_id{display:none;}.poster_id:hover+.posts_by_id{display:initial}</style>');
|
$('body').append('<style>.posts_by_id{display:none;}.poster_id:hover+.posts_by_id{display:initial}</style>');
|
||||||
update_thread_stats();
|
update_thread_stats();
|
||||||
$('#update_thread').click(update_thread_stats);
|
$('#update_thread').click(update_thread_stats);
|
||||||
$(document).on('new_post',update_thread_stats);
|
$(document).on('new_post',update_thread_stats);
|
||||||
});
|
});
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user