Version 5.0.6

This commit is contained in:
Neo committed 2025-12-19 18:55:49 -08:00
1 parent a3a4a9ccbd
commit b89858b2ff
1214 files changed
+92828 -14859

No files matched your search

@@ -73,82 +73,6 @@ window.ips.utils = {
return document.getElementById( id );
},
/**
* Extend an object with another object
*
* @param {object} originalObj Original object
* @param {object} newObj New object
* @returns {void}
*/
extendObj: function (originalObj, newObj) {
for( var i in newObj ){
if( newObj.hasOwnProperty(i) ){
originalObj[i] = newObj[i];
}
}
return originalObj;
},
/**
* Returns parsed information about a URL
*
* @param {string} url URL to parse
* @returns {object}
*/
parseURL: function (url) {
var elem = document.createElement('a');
ips.utils.insertBefore( elem, document.body.firstChild );
elem.href = url;
var data = {
protocol: elem.protocol,
hostname: elem.hostname,
port: elem.port,
pathname: elem.pathname,
search: elem.search,
hash: elem.hash,
host: elem.host
};
elem.parentNode.removeChild( elem );
return data;
},
/**
* Returns the document scroll offset
*
* @returns {object}
*/
getScrollOffset: function () {
var doc = document.documentElement;
return {
left: (window.pageXOffset || doc.scrollLeft) - (doc.clientLeft || 0),
top: (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0)
};
},
/**
* Returns the offset relative to the document for an element
*
* @param {element} element Element to get the offset for
* @returns {object}
*/
getOffset: function (element) {
var p = {
left: element.offsetLeft || 0,
top: element.offsetTop || 0
};
while (element = element.offsetParent) {
p.left += element.offsetLeft;
p.top += element.offsetTop;
}
return p;
},
/**
* Returns the outer height of the element
*
@@ -158,15 +82,6 @@ window.ips.utils = {
return elem.offsetHeight || 0;
},
/**
* Returns the outer width of the element
*
* @returns {number}
*/
getObjWidth: function (elem) {
return elem.offsetWidth || 0;
},
/**
* Fade the element in
*
@@ -190,30 +105,6 @@ window.ips.utils = {
tick();
},
/**
* Returns the document height
*
* @returns {number}
*/
getDocHeight: function () {
var D = document;
return Math.max(
D.body.scrollHeight, D.documentElement.scrollHeight,
D.body.offsetHeight, D.documentElement.offsetHeight,
D.body.clientHeight, D.documentElement.clientHeight
);
},
/**
* Returns the viewport height
*
* @returns {number}
*/
getViewportHeight: function () {
return Math.max( document.documentElement.clientHeight, window.innerHeight || 0 );
},
/**
* Returns attributes for an element
*