Skip to content

Commit

Permalink
More minor optimizations/typo fixes for the timer bar
Browse files Browse the repository at this point in the history
  • Loading branch information
Aktanusa committed Aug 25, 2014
1 parent 418b1a7 commit e4bca75
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions CookieMonster.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ CM.ToggleStatsConfig = function(config) {

CM.ConfigData.BotBar = {label: ['Bottom Bar OFF', 'Bottom Bar ON'], desc: 'Building Information', func: function() {CM.Disp.ToggleBotBar();}};
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();}};
CM.ConfigData.TimerBarPos = {label: ['Timer Bar Position (Top-left)', 'Timer Bar Position (Bottom)'], desc: 'Placement of the Timer Bar', func: function() {CM.Disp.ToggleTimerBarPos();}};
CM.ConfigData.TimerBarPos = {label: ['Timer Bar Position (Top Left)', 'Timer Bar Position (Bottom)'], desc: 'Placement of the Timer Bar', func: function() {CM.Disp.ToggleTimerBarPos();}};
CM.ConfigData.BuildColor = {label: ['Building Colors OFF', 'Building Colors ON'], desc: 'Color code buildings', func: function() {CM.Disp.UpdateBuildings();}};
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();}};
CM.ConfigData.Flash = {label: ['Flash OFF', 'Flash ON'], desc: 'Flash screen on Golden Cookie/Season Popup'};
Expand Down Expand Up @@ -613,14 +613,14 @@ CM.Disp.ToggleTimerBar = function() {
else {
CM.Disp.TimerBar.style.display = 'none';
}
CM.Disp.ToggleTimerBarPos();
CM.Disp.UpdateBotTimerBarDisplay();
}

CM.Disp.ToggleTimerBarPos = function() {
if (CM.Config.TimerBarPos == 0) {
CM.Disp.TimerBar.style.width = '30%';
CM.Disp.TimerBar.style.bottom = '';
l('game').insertBefore(CM.Disp.TimerBar, l('game').childNodes[22]);
l('game').insertBefore(CM.Disp.TimerBar, l('sectionLeft'));
}
else {
CM.Disp.TimerBar.style.width = '100%';
Expand Down
2 changes: 1 addition & 1 deletion src/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ CM.ToggleStatsConfig = function(config) {

CM.ConfigData.BotBar = {label: ['Bottom Bar OFF', 'Bottom Bar ON'], desc: 'Building Information', func: function() {CM.Disp.ToggleBotBar();}};
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();}};
CM.ConfigData.TimerBarPos = {label: ['Timer Bar Position (Top-left)', 'Timer Bar Position (Bottom)'], desc: 'Placement of the Timer Bar', func: function() {CM.Disp.ToggleTimerBarPos();}};
CM.ConfigData.TimerBarPos = {label: ['Timer Bar Position (Top Left)', 'Timer Bar Position (Bottom)'], desc: 'Placement of the Timer Bar', func: function() {CM.Disp.ToggleTimerBarPos();}};
CM.ConfigData.BuildColor = {label: ['Building Colors OFF', 'Building Colors ON'], desc: 'Color code buildings', func: function() {CM.Disp.UpdateBuildings();}};
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();}};
CM.ConfigData.Flash = {label: ['Flash OFF', 'Flash ON'], desc: 'Flash screen on Golden Cookie/Season Popup'};
Expand Down
4 changes: 2 additions & 2 deletions src/Disp.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,14 +294,14 @@ CM.Disp.ToggleTimerBar = function() {
else {
CM.Disp.TimerBar.style.display = 'none';
}
CM.Disp.ToggleTimerBarPos();
CM.Disp.UpdateBotTimerBarDisplay();
}

CM.Disp.ToggleTimerBarPos = function() {
if (CM.Config.TimerBarPos == 0) {
CM.Disp.TimerBar.style.width = '30%';
CM.Disp.TimerBar.style.bottom = '';
l('game').insertBefore(CM.Disp.TimerBar, l('game').childNodes[22]);
l('game').insertBefore(CM.Disp.TimerBar, l('sectionLeft'));
}
else {
CM.Disp.TimerBar.style.width = '100%';
Expand Down

0 comments on commit e4bca75

Please sign in to comment.