From e062f1626f16e1d4dcd85a7a0b71fa7aa4e51b82 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Wed, 5 Feb 2014 09:32:01 +0100 Subject: [PATCH] Remove Cooldown Prediction. --- src/General/Config.coffee | 1 - src/Posting/QR.cooldown.coffee | 11 +---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/General/Config.coffee b/src/General/Config.coffee index 14b665337..3ae30b93d 100644 --- a/src/General/Config.coffee +++ b/src/General/Config.coffee @@ -62,7 +62,6 @@ 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, 'Indicate the remaining time before posting again.'] - 'Cooldown Prediction': [true, 'Decrease the cooldown time by taking into account upload speed. Disable it if it\'s inaccurate for you.'] <% if (type === 'crx') { %> 'Tab to Choose Files First': [false, 'Tab to the file input before the submit button.'] <% } %> diff --git a/src/Posting/QR.cooldown.coffee b/src/Posting/QR.cooldown.coffee index 2f6a16f71..4a5f3f08c 100644 --- a/src/Posting/QR.cooldown.coffee +++ b/src/Posting/QR.cooldown.coffee @@ -7,8 +7,6 @@ QR.cooldown = $.off window, 'cooldown:timers', setTimers for type of QR.cooldown.types QR.cooldown.types[type] = +QR.cooldown.types[type] - QR.cooldown.upSpd = 0 - QR.cooldown.upSpdAccuracy = .5 key = "cooldown.#{g.BOARD}" $.get key, {}, (item) -> QR.cooldown.cooldowns = item[key] @@ -31,10 +29,6 @@ QR.cooldown = if delay cooldown = {delay} else - if post.file - upSpd = post.file.size / ((start - req.uploadStartTime) / $.SECOND) - QR.cooldown.upSpdAccuracy = ((upSpd > QR.cooldown.upSpd * .9) + QR.cooldown.upSpdAccuracy) / 2 - QR.cooldown.upSpd = upSpd cooldown = {isReply, threadID} QR.cooldown.cooldowns[start] = cooldown $.set "cooldown.#{g.BOARD}", QR.cooldown.cooldowns @@ -61,7 +55,7 @@ QR.cooldown = isReply = post.thread isnt 'new' hasFile = !!post.file seconds = null - {types, cooldowns, upSpd, upSpdAccuracy} = QR.cooldown + {types, cooldowns} = QR.cooldown for start, cooldown of cooldowns start = +start @@ -92,9 +86,6 @@ QR.cooldown = type += '_intra' if isReply and +post.thread is cooldown.threadID seconds = Math.max seconds, types[type] - elapsed - if seconds and Conf['Cooldown Prediction'] and hasFile and upSpd - seconds -= post.file.size // (upSpd * upSpdAccuracy) - seconds = Math.max seconds, 0 # Update the status when we change posting type. # Don't get stuck at some random number. # Don't interfere with progress status updates.