summaryrefslogtreecommitdiff
path: root/js/thread-stats.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/thread-stats.js')
-rw-r--r--js/thread-stats.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/js/thread-stats.js b/js/thread-stats.js
index fb520c71..f3b2d375 100644
--- a/js/thread-stats.js
+++ b/js/thread-stats.js
@@ -12,9 +12,9 @@ $(document).ready(function(){
//check if page uses unique ID
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];
+ thread_id = thread_id[thread_id.length -1].split(/+-/)[0].split('.')[0];
- $('form[name="postcontrols"] > .delete')
+ $('.boardlist.bottom, footer')
.first()
.before('<div id="thread_stats"></div>');
var el = $('#thread_stats');
@@ -67,6 +67,7 @@ $(document).ready(function(){
};
$('#thread_stats_uids').text(size(ids));
}
+ var board_name = $('input[name="board"]').val();
$.getJSON('//'+ document.location.host +'/'+ board_name +'/threads.json').success(function(data){
var found, page = '???';
for (var i=0;data[i];i++){
@@ -88,6 +89,7 @@ $(document).ready(function(){
// load the current page the thread is on.
// uses ajax call so it gets loaded on a delay (depending on network resources available)
var thread_stats_page_timer = setInterval(function(){
+ var board_name = $('input[name="board"]').val();
$.getJSON('//'+ document.location.host +'/'+ board_name +'/threads.json').success(function(data){
var found, page = '???';
for (var i=0;data[i];i++){