From a6bf046f8c3afe89c3040b791af005393732ab12 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sat, 30 Jun 2012 21:26:28 +0200 Subject: [PATCH] Display the specific network error text and increase retry coefficient during CLOUDFLARE TIEM! --- 4chan_x.user.js | 8 ++++++++ script.coffee | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/4chan_x.user.js b/4chan_x.user.js index d0b8ae7c1..97dc32aae 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2648,6 +2648,14 @@ QR.abort(); return; } + if (this.status !== 200 && this.status !== 304) { + Updater.retryCoef += 10 * (Updater.retryCoef < 120); + if (Conf['Verbose']) { + Updater.count.textContent = this.statusText; + Updater.count.className = 'warning'; + } + return; + } Updater.retryCoef = 10; Updater.timer.textContent = "-" + Conf['Interval']; /* diff --git a/script.coffee b/script.coffee index 045c75e50..ad6d13215 100644 --- a/script.coffee +++ b/script.coffee @@ -2073,6 +2073,12 @@ Updater = Unread.update true QR.abort() return + if @status isnt 200 and @status isnt 304 + Updater.retryCoef += 10 * (Updater.retryCoef < 120) + if Conf['Verbose'] + Updater.count.textContent = @statusText + Updater.count.className = 'warning' + return Updater.retryCoef = 10 Updater.timer.textContent = "-#{Conf['Interval']}"