pixl-xyapp 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ // Original Repo: https://github.com/StephanWagner/unscroll
2
+ // License: MIT
3
+ (function(root,factory){if(typeof define==="function"&&define.amd){define([],factory)}else if(typeof module==="object"&&module.exports){module.exports=factory()}else{root.unscroll=factory()}})(typeof self!=="undefined"?self:this,function(){function unscroll(elements){this.set=function(id,value){if(!window.unscrollStore){window.unscrollStore={}}window.unscrollStore[id]=value};this.get=function(id){return window.unscrollStore?window.unscrollStore[id]:null};this.getScrollbarWidth=function(){if(this.get("scrollbarWidth")){return this.get("scrollbarWidth")+"px"}var scrollElement=document.createElement("div");scrollElement.style.width="100px";scrollElement.style.height="100px";scrollElement.style.overflow="scroll";scrollElement.style.position="absolute";scrollElement.style.top="-10000";document.body.appendChild(scrollElement);var scrollbarWidth=scrollElement.offsetWidth-scrollElement.clientWidth;document.body.removeChild(scrollElement);this.set("scrollbarWidth",scrollbarWidth);return scrollbarWidth+"px"};function addUnscrollClassName(){if(document.getElementById("unscroll-class-name")){return}var css=".unscrollable { overflow: hidden !important; }";var head=document.head||document.getElementsByTagName("head")[0];var style=document.createElement("style");style.type="text/css";style.setAttribute("id","unscroll-class-name");style.appendChild(document.createTextNode(css));head.appendChild(style)}this.getElementsToAdjust=function(elements){!elements&&(elements=[]);if(typeof elements==="string"){elements=[[elements,"padding-right"]]}elements.forEach(function(element,index){if(typeof element==="string"){elements[index]=[element,"padding-right"]}});var bodyFound=false;for(var i=0;i<elements.length;i++){if(elements[i][0].indexOf("body")!==-1){bodyFound=true}}if(bodyFound===false){elements.push(["body","padding-right"])}return elements};this.pageHasScrollbar=function(){return this.getScrollbarWidth()&&document.body.offsetHeight>window.innerHeight};if(this.pageHasScrollbar()){elements=this.getElementsToAdjust(elements);for(var i=0;i<elements.length;i++){var elementsDOM=document.querySelectorAll(elements[i][0]);for(var j=0;j<elementsDOM.length;j++){if(elementsDOM[j].getAttribute("data-unscroll")){return}var attribute=elements[i][1];var computedStyles=window.getComputedStyle(elementsDOM[j]);var computedStyle=computedStyles.getPropertyValue(attribute);elementsDOM[j].setAttribute("data-unscroll",attribute);if(!computedStyle){computedStyle="0px"}var operator=attribute=="padding-right"||attribute=="right"?"+":"-";elementsDOM[j].style[attribute]="calc("+computedStyle+" "+operator+" "+this.getScrollbarWidth()+")"}}}addUnscrollClassName();document.body.classList.add("unscrollable")}unscroll.reset=function(){var elements=document.querySelectorAll("[data-unscroll]");for(var i=0;i<elements.length;i++){var attribute=elements[i].getAttribute("data-unscroll");elements[i].style[attribute]=null;elements[i].removeAttribute("data-unscroll")}document.body.classList.remove("unscrollable")};return unscroll});
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "pixl-xyapp",
3
+ "version": "2.1.0",
4
+ "description": "A theme for xyOps.",
5
+ "author": "Joseph Huckaby <jhuckaby@pixlcore.com>",
6
+ "homepage": "https://github.com/pixlcore/pixl-xyapp",
7
+ "license": "MIT",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/pixlcore/pixl-xyapp"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/pixlcore/pixl-xyapp/issues"
14
+ },
15
+ "keywords": [
16
+ "theme",
17
+ "javascript",
18
+ "webapp"
19
+ ]
20
+ }