From 418b1a7d2ed503080cbb51116cfe349ddf2a8d21 Mon Sep 17 00:00:00 2001 From: Aktanusa Date: Sun, 24 Aug 2014 22:18:09 -0400 Subject: [PATCH] Very minor optimization on timer bar creation. --- CookieMonster.js | 2 +- src/Disp.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CookieMonster.js b/CookieMonster.js index e734160..3ae5371 100644 --- a/CookieMonster.js +++ b/CookieMonster.js @@ -552,7 +552,7 @@ CM.Disp.CreateTimerBar = function() { colorBar.id = bars[i].id colorBar.style.display = 'inline-block'; colorBar.style.height = '10px'; - if (bars.length == 1 || i == 1) { + if (bars.length - 1 == i) { colorBar.style.borderTopRightRadius = '10px'; colorBar.style.borderBottomRightRadius = '10px'; } diff --git a/src/Disp.js b/src/Disp.js index 99b9647..4b51a4f 100644 --- a/src/Disp.js +++ b/src/Disp.js @@ -233,7 +233,7 @@ CM.Disp.CreateTimerBar = function() { colorBar.id = bars[i].id colorBar.style.display = 'inline-block'; colorBar.style.height = '10px'; - if (bars.length == 1 || i == 1) { + if (bars.length - 1 == i) { colorBar.style.borderTopRightRadius = '10px'; colorBar.style.borderBottomRightRadius = '10px'; }