diff options
| author | 8chan <admin@8chan.co> | 2014-11-17 05:23:41 -0800 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2015-03-31 05:47:09 +0200 |
| commit | d3cc27ff5cf598ead9d0045077f69ec73bb470c6 (patch) | |
| tree | 7707f53de46163da555ecec97adf9e59eadb0c51 | |
| parent | 4083c92dbe641f81c1b92fa33dd111199d5654b0 (diff) | |
Handle XHR errors better
| -rw-r--r-- | js/ajax.js | 12 |
1 files changed, 1 insertions, 11 deletions
@@ -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 = $('<input type="hidden">'); - $replacement.attr('name', $(this).attr('name')); - $replacement.val(submit_txt); - $(this) - .after($replacement) - .replaceWith($('<input type="button">').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, |
