From d3cc27ff5cf598ead9d0045077f69ec73bb470c6 Mon Sep 17 00:00:00 2001 From: 8chan Date: Mon, 17 Nov 2014 05:23:41 -0800 Subject: [PATCH] Handle XHR errors better --- js/ajax.js | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/js/ajax.js b/js/ajax.js index 663f4426..1b2bf2c0 100644 --- a/js/ajax.js +++ b/js/ajax.js @@ -115,17 +115,7 @@ $(window).ready(function() { } }, error: function(xhr, status, er) { - // An error occured - do_not_ajax = true; - $(form).find('input[type="submit"]').each(function() { - var $replacement = $(''); - $replacement.attr('name', $(this).attr('name')); - $replacement.val(submit_txt); - $(this) - .after($replacement) - .replaceWith($('').val(submit_txt)); - }); - $(form).submit(); + alert(_('The server returned an error or truncated response -- your post was probably still submitted. If it wasn\'t, 8chan.co might be experiencing issues right now -- please try your post again later.')); }, data: formData, cache: false,