mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-12-18 02:16:03 +01:00
thread-stats.js: final vichan fix, should work now
This commit is contained in:
parent
2d68972dd7
commit
bdda1613a6
@ -12,18 +12,18 @@ $(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('/');
|
||||||
thread_id = thread_id[thread_id.length -1].split(/\+-/)[0].split('.')[0];
|
thread_id = thread_id[thread_id.length -1].split('+')[0].split('-')[0].split('.')[0];
|
||||||
|
|
||||||
$('.boardlist.bottom, footer')
|
$('.boardlist.bottom, footer')
|
||||||
.first()
|
.first()
|
||||||
.before('<div id="thread_stats"></div>');
|
.before('<div id="thread_stats"></div>');
|
||||||
var el = $('#thread_stats');
|
var el = $('#thread_stats');
|
||||||
el.prepend('Page <span id="thread_stats_page">?</span>');
|
el.prepend(_('Page')+' <span id="thread_stats_page">?</span>');
|
||||||
if (IDsupport){
|
if (IDsupport){
|
||||||
el.prepend('<span id="thread_stats_uids">0</span> UIDs | ');
|
el.prepend('<span id="thread_stats_uids">0</span> UIDs | ');
|
||||||
}
|
}
|
||||||
el.prepend('<span id="thread_stats_images">0</span> images | ');
|
el.prepend('<span id="thread_stats_images">0</span> '+_('images')+' | ');
|
||||||
el.prepend('<span id="thread_stats_posts">0</span> replies | ');
|
el.prepend('<span id="thread_stats_posts">0</span> '+_('replies')+' | ');
|
||||||
delete el;
|
delete el;
|
||||||
function update_thread_stats(){
|
function update_thread_stats(){
|
||||||
var op = $('#thread_'+ thread_id +' > div.post.op:not(.post-hover):not(.inline)').first();
|
var op = $('#thread_'+ thread_id +' > div.post.op:not(.post-hover):not(.inline)').first();
|
||||||
|
Loading…
Reference in New Issue
Block a user