Fixed incompatibility issues with Edge (due to spread syntax). Fixed issue with Terminal autocomplete and capitalized commands. Script ram is now rounded to 2 decimal places

This commit is contained in:
danielyxie
2018-07-02 22:35:12 -05:00
parent c8421168b6
commit 3213032427
10 changed files with 169 additions and 40 deletions
+25 -5
View File
@@ -243,6 +243,11 @@ function powerOfTwo(n) {
return n && (n & (n-1)) === 0;
}
//Rounds a number to two decimal places
function roundToTwo(n) {
return +(Math.round(n + "e+2") + "e-2");
}
function exceptionAlert(e) {
dialogBoxCreate("Caught an exception: " + e + "<br><br>" +
"Filename: " + e.fileName + "<br><br>" +
@@ -270,9 +275,24 @@ function createProgressBarText(params={}) {
return "[" + Array(numTicks+1).join("|") + Array(numDashes+1).join("-") + "]";
}
export {sizeOfObject, clearObject, addOffset, clearEventListeners, getRandomInt,
compareArrays, printArray, powerOfTwo, clearEventListenersEl,
removeElementById, removeElement, createElement, createAccordionElement,
export {sizeOfObject,
clearObject,
addOffset,
clearEventListeners,
getRandomInt,
compareArrays,
printArray,
powerOfTwo,
roundToTwo,
clearEventListenersEl,
removeElementById,
removeElement,
createElement,
createAccordionElement,
appendLineBreaks,
removeChildrenFromElement, createPopup, clearSelector, exceptionAlert,
createProgressBarText, getElementById};
removeChildrenFromElement,
createPopup,
clearSelector,
exceptionAlert,
createProgressBarText,
getElementById};