Merge pull request #73 from nonmakina/autoReload

Fixes jquery API breaking changes in auto-reload and thread-stats
This commit is contained in:
towards-a-new-leftypol 2020-12-31 07:13:42 -05:00 committed by GitHub
commit d84717feae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -271,6 +271,7 @@ $config['default_stylesheet'] = array('Dark Red', $config['stylesheets']['Dark R
$config['additional_javascript'][] = 'js/local-time.js';
$config['additional_javascript'][] = 'js/auto-reload.js';
$config['additional_javascript'][] = 'js/thread-stats.js';
$config['additional_javascript'][] = 'js/post-hover.js';
$config['additional_javascript'][] = 'js/style-select.js';

View File

@ -47,7 +47,7 @@ $(document).ready(function(){
{
return; // not index
}
if($(".post.op").size() != 1)
if($(".post.op").length != 1)
{
return; //not thread page
}

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;