Anonymous ID: ff2f42 Dec. 15, 2020, 9:17 a.m. No.12038648   🗄️.is 🔗kun   >>8668 >>8766 >>9310

>>12037750 (PB)

 

Try this

$(document).ready(function () {

// iterate each post in the thread, adding an overall post count#

var updatePostCount = function () {

$('span.threadCount').empty();

$('span.posts_by_id').each(function (i, v) {

var $count = $('<span class="threadCount" style="font-weight:bold">(#' + (i + 1) + ')</span>')

$(v).after($count);

 

});

};

 

// Make it go

updatePostCount();

 

// allow to work with auto-reload.js, etc.

$(document).on('new_post', function (e, post) {

updatePostCount();

});

});