Skip to content

Instantly share code, notes, and snippets.

@carlank
carlank / mod.js
Last active January 2, 2021 08:30
QoL mods for Progress Knight
const timeDisplay = document.createElement('div');
const modUpdate = () => {
const losingMoney = getIncome() < getExpense();
if(losingMoney){
const daysUntilBankrupt = Math.floor(gameData.coins / getNet());
const ageString = `Age ${daysToYears(gameData.days + daysUntilBankrupt)} Day ${(getDay() + daysUntilBankrupt)%365 + 1 }`;
timeDisplay.textContent = `${daysUntilBankrupt} days until bankruptcy\n(until ${ageString})`;
} else {
timeDisplay.textContent = '';
}