diff --git a/CHANGELOG.md b/CHANGELOG.md index b25e5ed4c..54cf98731 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +- Added the option `Cooldown Prediction`, enabled by default. - Added the option `Hide Unread Count at (0)`, disabled by default. ### 3.1.4 - *2013-04-17* diff --git a/src/config.coffee b/src/config.coffee index b59267a25..713982f9c 100644 --- a/src/config.coffee +++ b/src/config.coffee @@ -61,6 +61,7 @@ Config = 'Remember Spoiler': [false, 'Remember the spoiler state, instead of resetting after posting.'] 'Hide Original Post Form': [true, 'Hide the normal post form.'] 'Cooldown': [true, 'Prevent "flood detected" errors.'] + 'Cooldown Prediction': [true, 'Decrease the cooldown time by taking into account upload speed. Disable it if it\'s inaccurate for you.'] 'Quote Links': 'Quote Backlinks': [true, 'Add quote backlinks.'] 'OP Backlinks': [true, 'Add backlinks to the OP.'] diff --git a/src/qr.coffee b/src/qr.coffee index 575e1653f..915f53e7b 100644 --- a/src/qr.coffee +++ b/src/qr.coffee @@ -239,7 +239,7 @@ QR = elapsed = Math.floor (now - start) / $.SECOND if elapsed >= 0 # clock changed since then? seconds = Math.max seconds, types[type] - elapsed - if hasFile and upSpd + if Conf['Cooldown Prediction'] and hasFile and upSpd seconds -= Math.floor post.file.size / upSpd * upSpdAccuracy seconds = Math.max seconds, 0 unless start <= now <= cooldown.timeout