java.js
// Rounds variables to different non byte displays (like thousands, millions)
Rounds variables to different non byte displays (like thousands, millions)
Rounds variables to different non byte displays ( like thousands millions )
function roundDisp(currentDisp, priorityMode, addZeroes) {
	if (currentDisp >= 1000) {
		if (currentDisp >= 1000000) {
			if (currentDisp >= 1000000000) {
				if (currentDisp >= 1000000000000) {
					newerdisp = currentDisp / 1000000000;
					newerdisp = Math.round(newerdisp);
					newerdisp = newerdisp / 1000;
					if (addZeroes === 1) {newerdisp = addTheZeroes(newerdisp);}
					newerdisp = `${newerdisp} T`;
				} else {
					newerdisp = currentDisp / 1000000;
					newerdisp = Math.round(newerdisp);
					newerdisp = newerdisp / 1000;
					if (addZeroes === 1) {newerdisp = addTheZeroes(newerdisp);}
					newerdisp = `${newerdisp} B`;
				}
			} else {
				newerdisp = currentDisp / 1000;
				newerdisp = Math.round(newerdisp);
				newerdisp = newerdisp / 1000;
				if (addZeroes === 1) {newerdisp = addTheZeroes(newerdisp);}
				newerdisp = `${newerdisp} M`;
			}
		} else {
			newerdisp = Math.round(currentDisp);
			newerdisp = addCommasToNumber(newerdisp);
		}
	} else {
		newerdisp = currentDisp
	}
	if (priorityMode === 'n') {newdisp = newerdisp;}
	else if (priorityMode === 's') {
		bpscount.innerHTML = newerdisp + " per second";
		document.getElementById("ontopsps").innerHTML = newerdisp + " per second";
	} else if (priorityMode === 'm') {
		scorel.innerHTML = newerdisp;
		document.getElementById("ontopsize").innerHTML = newerdisp;
	} else if (priorityMode === "title") {document.querySelector("title").textContent = `${newerdisp} - idle file`;}
	else {return newerdisp;}
}
function roundDisp ( currentDisp , priorityMode , addZeroes ) { if ( currentDisp >= 1000 ) { if ( currentDisp >= 1000000 ) { if ( currentDisp >= 1000000000 ) { if ( currentDisp >= 1000000000000 ) { newerdisp = currentDisp / 1000000000 ; newerdisp = Math . round ( newerdisp ) ; newerdisp = newerdisp / 1000 ; if ( addZeroes === 1 ) { newerdisp = addTheZeroes ( newerdisp ) ; } newerdisp = ` ${ newerdisp } ` ; } else { newerdisp = currentDisp / 1000000 ; newerdisp = Math . round ( newerdisp ) ; newerdisp = newerdisp / 1000 ; if ( addZeroes === 1 ) { newerdisp = addTheZeroes ( newerdisp ) ; } newerdisp = ` ${ newerdisp } ` ; } } else { newerdisp = currentDisp / 1000 ; newerdisp = Math . round ( newerdisp ) ; newerdisp = newerdisp / 1000 ; if ( addZeroes === 1 ) { newerdisp = addTheZeroes ( newerdisp ) ; } newerdisp = ` ${ newerdisp } ` ; } } else { newerdisp = Math . round ( currentDisp ) ; newerdisp = addCommasToNumber ( newerdisp ) ; } } else { newerdisp = currentDisp } if ( priorityMode === 'n' ) { newdisp = newerdisp ; } else if ( priorityMode === 's' ) { bpscount . innerHTML = newerdisp + " per second" ; document . getElementById ( "ontopsps" ) . innerHTML = newerdisp + " per second" ; } else if ( priorityMode === 'm' ) { scorel . innerHTML = newerdisp ; document . getElementById ( "ontopsize" ) . innerHTML = newerdisp ; } else if ( priorityMode === "title" ) { document . querySelector ( "title" ) . textContent = ` ${ newerdisp } ` ; } else { return newerdisp ; } }
Rounds variables to different non byte displays (like thousands, millions)
Rounds variables to different non byte displays ( like thousands millions )
// Trillions // @ts-ignore // Billions // @ts-ignore // Millions // @ts-ignore // Thousands // Ones // @ts-ignore // @ts-ignore