Change to "color" to "colour"

This commit is contained in:
Daniël van Noord
2021-07-25 14:42:21 +02:00
parent 65eff470cf
commit d0ddc93f7c
20 changed files with 99 additions and 99 deletions

View File

@@ -33,10 +33,10 @@ export function CreateBotBar() {
table.style.whiteSpace = 'nowrap';
const tbody = table.appendChild(document.createElement('tbody'));
const firstCol = function (text, color) {
const firstCol = function (text, colour) {
const td = document.createElement('td');
td.style.textAlign = 'right';
td.className = ColourTextPre + color;
td.className = ColourTextPre + colour;
td.textContent = text;
return td;
};
@@ -86,7 +86,7 @@ export function UpdateBotBar() {
2,
);
l('CMBotBar').firstChild.firstChild.childNodes[2].childNodes[count].className =
ColourTextPre + target[i].color;
ColourTextPre + target[i].colour;
let PPString;
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.PPDisplayTime)
PPString = FormatTime(Math.round(target[i].pp));
@@ -96,7 +96,7 @@ export function UpdateBotBar() {
(Game.Objects[i].bulkPrice - (Game.cookies + GetWrinkConfigBank())) / GetCPS(),
);
l('CMBotBar').firstChild.firstChild.childNodes[3].childNodes[count].className =
ColourTextPre + timeColour.color;
ColourTextPre + timeColour.colour;
if (timeColour.text === 'Done!' && Game.cookies < Game.Objects[i].bulkPrice) {
l('CMBotBar').firstChild.firstChild.childNodes[3].childNodes[
count

View File

@@ -6,7 +6,7 @@ import { ColourBackPre, ColourBlue, ColourTextPre } from '../VariablesAndData';
* This function creates an indivudual timer for the timer bar
* @param {string} id An id to identify the timer
* @param {string} name The title of the timer
* @param [{{string}, {string}}, ...] bars ([id, color]) The id and colours of individual parts of the timer
* @param [{{string}, {string}}, ...] bars ([id, colour]) The id and colours of individual parts of the timer
*/
export function CreateTimer(id, name, bars) {
const timerBar = document.createElement('div');
@@ -36,20 +36,20 @@ export function CreateTimer(id, name, bars) {
div.appendChild(type);
for (let i = 0; i < bars.length; i++) {
const colorBar = document.createElement('span');
colorBar.id = bars[i].id;
colorBar.style.display = 'inline-block';
colorBar.style.height = '10px';
colorBar.style.verticalAlign = 'text-top';
colorBar.style.textAlign = 'center';
const colourBar = document.createElement('span');
colourBar.id = bars[i].id;
colourBar.style.display = 'inline-block';
colourBar.style.height = '10px';
colourBar.style.verticalAlign = 'text-top';
colourBar.style.textAlign = 'center';
if (bars.length - 1 === i) {
colorBar.style.borderTopRightRadius = '10px';
colorBar.style.borderBottomRightRadius = '10px';
colourBar.style.borderTopRightRadius = '10px';
colourBar.style.borderBottomRightRadius = '10px';
}
if (typeof bars[i].color !== 'undefined') {
colorBar.className = ColourBackPre + bars[i].color;
if (typeof bars[i].colour !== 'undefined') {
colourBar.className = ColourBackPre + bars[i].colour;
}
div.appendChild(colorBar);
div.appendChild(colourBar);
}
const timer = document.createElement('span');

View File

@@ -26,21 +26,21 @@ export function CreateTimerBar() {
// Create standard Autosave bar
const CMTimerBarAutosave = CreateTimer('CMTimerBarAutosave', 'Autosave', [
{ id: 'CMTimerBarAutosaveBar', color: ColourPurple },
{ id: 'CMTimerBarAutosaveBar', colour: ColourPurple },
]);
TimerBar.appendChild(CMTimerBarAutosave);
// Create standard Golden Cookie bar
const CMTimerBarGC = CreateTimer('CMTimerBarGC', 'Next Cookie', [
{ id: 'CMTimerBarGCMinBar', color: ColourGray },
{ id: 'CMTimerBarGCBar', color: ColourPurple },
{ id: 'CMTimerBarGCMinBar', colour: ColourGray },
{ id: 'CMTimerBarGCBar', colour: ColourPurple },
]);
TimerBar.appendChild(CMTimerBarGC);
// Create standard Reindeer bar
const CMTimerBarRen = CreateTimer('CMTimerBarRen', 'Next Reindeer', [
{ id: 'CMTimerBarRenMinBar', color: ColourGray },
{ id: 'CMTimerBarRenBar', color: ColourOrange },
{ id: 'CMTimerBarRenMinBar', colour: ColourGray },
{ id: 'CMTimerBarRenBar', colour: ColourOrange },
]);
TimerBar.appendChild(CMTimerBarRen);
const TimerBarBuffTimers = document.createElement('div');
@@ -171,7 +171,7 @@ export function UpdateTimerBar() {
]);
timer.style.display = '';
let classColour = '';
// Gives specific timers specific colors
// Gives specific timers specific colours
if (typeof BuffColours[Game.buffs[i].name] !== 'undefined') {
classColour = BuffColours[Game.buffs[i].name];
} else classColour = ColourPurple;