From 39592c856c60711b19151fa61d8394c7eefb4498 Mon Sep 17 00:00:00 2001 From: Bluesaxman Date: Sat, 20 Apr 2019 10:30:10 -0600 Subject: [PATCH] updated to current version 1.8.2 --- libs/bluecore.js | 92 ++++++++++++++++++++++++++++-------------------- 1 file changed, 54 insertions(+), 38 deletions(-) diff --git a/libs/bluecore.js b/libs/bluecore.js index 424c561..b1fece5 100644 --- a/libs/bluecore.js +++ b/libs/bluecore.js @@ -1,5 +1,5 @@ "use strict"; -/////////////////////// BlueCore 1.7.2 \\\\\\\\\\\\\\\\\\\\\\\\\\ +/////////////////////// BlueCore 1.8.2 \\\\\\\\\\\\\\\\\\\\\\\\\\ function getData(url,dothis,tothis,type,body) { var DataRequest = new XMLHttpRequest(); @@ -50,6 +50,7 @@ function getHTMLfrag(url,targetNode) { } function elementMake (ID,Class,element) { //new and improved, I can use more than just divs for things now. + ID = "string" == typeof ID ? ID.replace(/ /g,"_") : ID; return (function (myElement) { if ("string" == typeof ID) { myElement.id = ID; } if ("string" == typeof Class) { myElement.className = Class; } @@ -58,6 +59,8 @@ function elementMake (ID,Class,element) { //new and improved, I can use more tha } function elementPlace (parentID, ID, Class, element, position) { + parentID = "string" == typeof parentID ? parentID.replace(/ /g,"_") : parentID; + ID = "string" == typeof ID ? ID.replace(/ /g,"_") : ID; var newElement = elementMake(ID,Class,element); if ( (typeof document.querySelector(parentID).append && typeof document.querySelector(parentID).prepend) !== "undefined") { // Are we compliant? if ("before" == position) { @@ -76,6 +79,23 @@ function elementPlace (parentID, ID, Class, element, position) { return newElement; } +function titledContainer (ParentID,ID,Class,Element,Position,Title) { + var outer = elementPlace(ParentID,"outer_"+ID,"outer "+Class,"div",Position); + outer.innerHTML = '

'+Title+'

'; + return elementPlace("#outer_"+ID,ID,Class,Element); +} + +function numberShorten (Value) { + var level = 0; + var number = Value; + var unit = ["","k","M","B","T","q","Q","s","S","O","N","d","Ud","Dd","Td","qd","Qd","sd","Sd","Od","Nd","v","Uv","Dv","Tv","qv","Qv","sv","Sv","Ov","Nv","t","Ut","Dt","Tt","qt","Qt","st","St","Ot","Nv","c","uc","dc","Tc","Dc","Uc","vc","Sc","Oc","Nc","STOP"]; + while (999