Added prettier (#661)
* Added prettier * Added prettier * Added prettier
This commit is contained in:
@@ -7,11 +7,11 @@ import { CMOptions } from '../VariablesAndData';
|
||||
* It is called by CM.Disp.UpdateAscendState() and a change in CMOptions.BotBar
|
||||
*/
|
||||
export default function ToggleBotBar() {
|
||||
if (CMOptions.BotBar === 1) {
|
||||
l('CMBotBar').style.display = '';
|
||||
UpdateBotBar();
|
||||
} else {
|
||||
l('CMBotBar').style.display = 'none';
|
||||
}
|
||||
UpdateBotTimerBarPosition();
|
||||
if (CMOptions.BotBar === 1) {
|
||||
l('CMBotBar').style.display = '';
|
||||
UpdateBotBar();
|
||||
} else {
|
||||
l('CMBotBar').style.display = 'none';
|
||||
}
|
||||
UpdateBotTimerBarPosition();
|
||||
}
|
||||
|
||||
@@ -7,6 +7,6 @@ import { CMOptions } from '../VariablesAndData';
|
||||
* It is called by a change in CM.Options.DetailedTime
|
||||
*/
|
||||
export default function ToggleDetailedTime() {
|
||||
if (CMOptions.DetailedTime === 1) Game.sayTime = CMSayTime;
|
||||
else Game.sayTime = BackupFunctions.sayTime;
|
||||
if (CMOptions.DetailedTime === 1) Game.sayTime = CMSayTime;
|
||||
else Game.sayTime = BackupFunctions.sayTime;
|
||||
}
|
||||
|
||||
@@ -7,13 +7,13 @@ import { CMOptions } from '../VariablesAndData';
|
||||
* It is called by a change in CM.Options.GCTimer
|
||||
*/
|
||||
export default function ToggleGCTimer() {
|
||||
if (CMOptions.GCTimer === 1) {
|
||||
for (const i of Object.keys(GCTimers)) {
|
||||
GCTimers[i].style.display = 'block';
|
||||
GCTimers[i].style.left = CacheGoldenShimmersByID[i].l.style.left;
|
||||
GCTimers[i].style.top = CacheGoldenShimmersByID[i].l.style.top;
|
||||
}
|
||||
} else {
|
||||
for (const i of Object.keys(GCTimers)) GCTimers[i].style.display = 'none';
|
||||
}
|
||||
if (CMOptions.GCTimer === 1) {
|
||||
for (const i of Object.keys(GCTimers)) {
|
||||
GCTimers[i].style.display = 'block';
|
||||
GCTimers[i].style.left = CacheGoldenShimmersByID[i].l.style.left;
|
||||
GCTimers[i].style.top = CacheGoldenShimmersByID[i].l.style.top;
|
||||
}
|
||||
} else {
|
||||
for (const i of Object.keys(GCTimers)) GCTimers[i].style.display = 'none';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,15 +6,15 @@ import { CMOptions } from '../VariablesAndData';
|
||||
* and upon creation of the warning tooltip by CM.Disp.UpdateTooltipWarnings()
|
||||
*/
|
||||
export default function ToggleToolWarnPos() {
|
||||
if (l('CMDispTooltipWarningParent') !== null) {
|
||||
if (CMOptions.ToolWarnPos === 0) {
|
||||
l('CMDispTooltipWarningParent').style.top = 'auto';
|
||||
l('CMDispTooltipWarningParent').style.margin = '4px -4px';
|
||||
l('CMDispTooltipWarningParent').style.padding = '3px 4px';
|
||||
} else {
|
||||
l('CMDispTooltipWarningParent').style.right = 'auto';
|
||||
l('CMDispTooltipWarningParent').style.margin = '4px';
|
||||
l('CMDispTooltipWarningParent').style.padding = '4px 3px';
|
||||
}
|
||||
}
|
||||
if (l('CMDispTooltipWarningParent') !== null) {
|
||||
if (CMOptions.ToolWarnPos === 0) {
|
||||
l('CMDispTooltipWarningParent').style.top = 'auto';
|
||||
l('CMDispTooltipWarningParent').style.margin = '4px -4px';
|
||||
l('CMDispTooltipWarningParent').style.padding = '3px 4px';
|
||||
} else {
|
||||
l('CMDispTooltipWarningParent').style.right = 'auto';
|
||||
l('CMDispTooltipWarningParent').style.margin = '4px';
|
||||
l('CMDispTooltipWarningParent').style.padding = '4px 3px';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,17 @@ import { CMOptions } from '../VariablesAndData';
|
||||
* It is called by a change in CM.Options.UpBarColor
|
||||
*/
|
||||
export default function ToggleUpgradeBarAndColor() {
|
||||
if (CMOptions.UpBarColor === 1) { // Colours and bar on
|
||||
l('CMUpgradeBar').style.display = '';
|
||||
UpdateUpgrades();
|
||||
} else if (CMOptions.UpBarColor === 2) { // Colours on and bar off
|
||||
l('CMUpgradeBar').style.display = 'none';
|
||||
UpdateUpgrades();
|
||||
} else { // Colours and bar off
|
||||
l('CMUpgradeBar').style.display = 'none';
|
||||
Game.RebuildUpgrades();
|
||||
}
|
||||
if (CMOptions.UpBarColor === 1) {
|
||||
// Colours and bar on
|
||||
l('CMUpgradeBar').style.display = '';
|
||||
UpdateUpgrades();
|
||||
} else if (CMOptions.UpBarColor === 2) {
|
||||
// Colours on and bar off
|
||||
l('CMUpgradeBar').style.display = 'none';
|
||||
UpdateUpgrades();
|
||||
} else {
|
||||
// Colours and bar off
|
||||
l('CMUpgradeBar').style.display = 'none';
|
||||
Game.RebuildUpgrades();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,10 +5,11 @@ import { CMOptions } from '../VariablesAndData';
|
||||
* It is called by a change in CM.Options.UpgradeBarFixedPos
|
||||
*/
|
||||
export default function ToggleUpgradeBarFixedPos() {
|
||||
if (CMOptions.UpgradeBarFixedPos === 1) { // Fix to top of screen when scrolling
|
||||
l('CMUpgradeBar').style.position = 'sticky';
|
||||
l('CMUpgradeBar').style.top = '0px';
|
||||
} else {
|
||||
l('CMUpgradeBar').style.position = ''; // Possible to scroll offscreen
|
||||
}
|
||||
if (CMOptions.UpgradeBarFixedPos === 1) {
|
||||
// Fix to top of screen when scrolling
|
||||
l('CMUpgradeBar').style.position = 'sticky';
|
||||
l('CMUpgradeBar').style.top = '0px';
|
||||
} else {
|
||||
l('CMUpgradeBar').style.position = ''; // Possible to scroll offscreen
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,11 +5,11 @@ import { CMOptions } from '../VariablesAndData';
|
||||
* It is called by changes in CM.Options.WrinklerButtons
|
||||
*/
|
||||
export default function ToggleWrinklerButtons() {
|
||||
if (CMOptions.WrinklerButtons) {
|
||||
l('PopAllNormalWrinklerButton').style.display = '';
|
||||
l('PopFattestWrinklerButton').style.display = '';
|
||||
} else {
|
||||
l('PopAllNormalWrinklerButton').style.display = 'none';
|
||||
l('PopFattestWrinklerButton').style.display = 'none';
|
||||
}
|
||||
if (CMOptions.WrinklerButtons) {
|
||||
l('PopAllNormalWrinklerButton').style.display = '';
|
||||
l('PopFattestWrinklerButton').style.display = '';
|
||||
} else {
|
||||
l('PopAllNormalWrinklerButton').style.display = 'none';
|
||||
l('PopFattestWrinklerButton').style.display = 'none';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user