Skip to content

Commit e4bca75

Browse files
committed
More minor optimizations/typo fixes for the timer bar
1 parent 418b1a7 commit e4bca75

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

CookieMonster.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ CM.ToggleStatsConfig = function(config) {
287287

288288
CM.ConfigData.BotBar = {label: ['Bottom Bar OFF', 'Bottom Bar ON'], desc: 'Building Information', func: function() {CM.Disp.ToggleBotBar();}};
289289
CM.ConfigData.TimerBar = {label: ['Timer Bar OFF', 'Timer Bar ON'], desc: 'Timers of Golden Cookie, Season Popup, Frenzy (Normal, Clot, Elder), Click Frenzy', func: function() {CM.Disp.ToggleTimerBar();}};
290-
CM.ConfigData.TimerBarPos = {label: ['Timer Bar Position (Top-left)', 'Timer Bar Position (Bottom)'], desc: 'Placement of the Timer Bar', func: function() {CM.Disp.ToggleTimerBarPos();}};
290+
CM.ConfigData.TimerBarPos = {label: ['Timer Bar Position (Top Left)', 'Timer Bar Position (Bottom)'], desc: 'Placement of the Timer Bar', func: function() {CM.Disp.ToggleTimerBarPos();}};
291291
CM.ConfigData.BuildColor = {label: ['Building Colors OFF', 'Building Colors ON'], desc: 'Color code buildings', func: function() {CM.Disp.UpdateBuildings();}};
292292
CM.ConfigData.UpBarColor = {label: ['Upgrade Bar/Colors OFF', 'Upgrade Bar/Colors ON'], desc: 'Color code upgrades and add a counter', func: function() {CM.Disp.ToggleUpBarColor();}};
293293
CM.ConfigData.Flash = {label: ['Flash OFF', 'Flash ON'], desc: 'Flash screen on Golden Cookie/Season Popup'};
@@ -613,14 +613,14 @@ CM.Disp.ToggleTimerBar = function() {
613613
else {
614614
CM.Disp.TimerBar.style.display = 'none';
615615
}
616-
CM.Disp.ToggleTimerBarPos();
616+
CM.Disp.UpdateBotTimerBarDisplay();
617617
}
618618

619619
CM.Disp.ToggleTimerBarPos = function() {
620620
if (CM.Config.TimerBarPos == 0) {
621621
CM.Disp.TimerBar.style.width = '30%';
622622
CM.Disp.TimerBar.style.bottom = '';
623-
l('game').insertBefore(CM.Disp.TimerBar, l('game').childNodes[22]);
623+
l('game').insertBefore(CM.Disp.TimerBar, l('sectionLeft'));
624624
}
625625
else {
626626
CM.Disp.TimerBar.style.width = '100%';

src/Config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ CM.ToggleStatsConfig = function(config) {
9898

9999
CM.ConfigData.BotBar = {label: ['Bottom Bar OFF', 'Bottom Bar ON'], desc: 'Building Information', func: function() {CM.Disp.ToggleBotBar();}};
100100
CM.ConfigData.TimerBar = {label: ['Timer Bar OFF', 'Timer Bar ON'], desc: 'Timers of Golden Cookie, Season Popup, Frenzy (Normal, Clot, Elder), Click Frenzy', func: function() {CM.Disp.ToggleTimerBar();}};
101-
CM.ConfigData.TimerBarPos = {label: ['Timer Bar Position (Top-left)', 'Timer Bar Position (Bottom)'], desc: 'Placement of the Timer Bar', func: function() {CM.Disp.ToggleTimerBarPos();}};
101+
CM.ConfigData.TimerBarPos = {label: ['Timer Bar Position (Top Left)', 'Timer Bar Position (Bottom)'], desc: 'Placement of the Timer Bar', func: function() {CM.Disp.ToggleTimerBarPos();}};
102102
CM.ConfigData.BuildColor = {label: ['Building Colors OFF', 'Building Colors ON'], desc: 'Color code buildings', func: function() {CM.Disp.UpdateBuildings();}};
103103
CM.ConfigData.UpBarColor = {label: ['Upgrade Bar/Colors OFF', 'Upgrade Bar/Colors ON'], desc: 'Color code upgrades and add a counter', func: function() {CM.Disp.ToggleUpBarColor();}};
104104
CM.ConfigData.Flash = {label: ['Flash OFF', 'Flash ON'], desc: 'Flash screen on Golden Cookie/Season Popup'};

src/Disp.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,14 +294,14 @@ CM.Disp.ToggleTimerBar = function() {
294294
else {
295295
CM.Disp.TimerBar.style.display = 'none';
296296
}
297-
CM.Disp.ToggleTimerBarPos();
297+
CM.Disp.UpdateBotTimerBarDisplay();
298298
}
299299

300300
CM.Disp.ToggleTimerBarPos = function() {
301301
if (CM.Config.TimerBarPos == 0) {
302302
CM.Disp.TimerBar.style.width = '30%';
303303
CM.Disp.TimerBar.style.bottom = '';
304-
l('game').insertBefore(CM.Disp.TimerBar, l('game').childNodes[22]);
304+
l('game').insertBefore(CM.Disp.TimerBar, l('sectionLeft'));
305305
}
306306
else {
307307
CM.Disp.TimerBar.style.width = '100%';

0 commit comments

Comments
 (0)