Fixes jquery API breaking changes in auto-reload and thread-stats

This commit is contained in:
nonmakina 2020-12-31 01:04:11 -06:00
parent b7f30ed4d1
commit c2a2c667d6
3 changed files with 4 additions and 3 deletions

View file

@ -66,7 +66,7 @@ $(document).ready(function(){
};
$('#thread_stats_uids').text(size(ids));
}
$.getJSON('//'+ document.location.host +'/'+ board_name +'/threads.json').success(function(data){
$.getJSON('//'+ document.location.host +'/'+ board_name +'/threads.json', function(data){
var found, page = '???';
for (var i=0;data[i];i++){
var threads = data[i].threads;
@ -87,7 +87,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(){
$.getJSON('//'+ document.location.host +'/'+ board_name +'/threads.json').success(function(data){
$.getJSON('//'+ document.location.host +'/'+ board_name +'/threads.json', function(data){
var found, page = '???';
for (var i=0;data[i];i++){
var threads = data[i].threads;