Improve broken auto-reload

This commit is contained in:
discomrade 2021-09-28 08:02:04 +00:00
parent 0806e39c03
commit fa4f543a2d
2 changed files with 16 additions and 20 deletions

View file

@ -80,7 +80,6 @@ $(window).ready(function() {
|| (!settings.get('always_noko_replies', true) && !post_response.noko)) {
document.location = post_response.redirect;
} else {
/*
$.ajax({
url: document.location,
success: function(data) {
@ -89,6 +88,8 @@ $(window).ready(function() {
if($('#' + id).length == 0) {
$(this).insertAfter($('div.post:last').next()).after('<br class="clear">');
$(document).trigger('new_post', this);
// auto-reload.js immediate update on own post
$(document).trigger('own_new_post', this);
// watch.js & auto-reload.js retrigger
setTimeout(function() { $(window).trigger("scroll"); }, 100);
}
@ -107,7 +108,6 @@ $(window).ready(function() {
contentType: false,
processData: false
}, 'html');
*/
}
$(form).find('input[type="submit"]').val(_('Posted...'));
$(document).trigger("ajax_after_post", post_response);