From afc89b6a3a52d3704da9173e530cd45ba7e1d817 Mon Sep 17 00:00:00 2001 From: Kristinita Date: Tue, 8 May 2018 09:22:42 +0300 Subject: [PATCH] perf(minify): minify CSS and JavaScript Use cssnano and Uglify JS --- gemini-scrollbar.min.css | 1 + index.min.js | 1 + 2 files changed, 2 insertions(+) create mode 100644 gemini-scrollbar.min.css create mode 100644 index.min.js diff --git a/gemini-scrollbar.min.css b/gemini-scrollbar.min.css new file mode 100644 index 0000000..8038844 --- /dev/null +++ b/gemini-scrollbar.min.css @@ -0,0 +1 @@ +.gm-scrollbar-disable-selection{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.gm-prevented{-webkit-overflow-scrolling:touch}.gm-prevented>.gm-scrollbar{display:none}.gm-scrollbar-container{position:relative;overflow:hidden!important;width:100%;height:100%}.gm-scrollbar{position:absolute;right:2px;bottom:2px;z-index:1;border-radius:3px}.gm-scrollbar.-vertical{width:6px;top:2px}.gm-scrollbar.-horizontal{height:6px;left:2px}.gm-scrollbar .thumb{position:relative;display:block;width:0;height:0;cursor:pointer;border-radius:inherit;background-color:rgba(0,0,0,.2);transform:translateZ(0)}.gm-scrollbar .thumb:active,.gm-scrollbar .thumb:hover{background-color:rgba(0,0,0,.3)}.gm-scrollbar.-vertical .thumb{width:100%}.gm-scrollbar.-horizontal .thumb{height:100%}.gm-scrollbar-container .gm-scroll-view{width:100%;height:100%;overflow:scroll;transform:translateZ(0);-webkit-overflow-scrolling:touch}.gm-scrollbar-container.gm-autoshow .gm-scrollbar{opacity:0;transition:opacity .12s ease-out}.gm-scrollbar-container.gm-autoshow:active>.gm-scrollbar,.gm-scrollbar-container.gm-autoshow:focus>.gm-scrollbar,.gm-scrollbar-container.gm-autoshow:hover>.gm-scrollbar{opacity:1;transition:opacity .34s ease-out}.gm-resize-trigger{position:absolute;display:block;top:0;left:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1;opacity:0} \ No newline at end of file diff --git a/index.min.js b/index.min.js new file mode 100644 index 0000000..291f081 --- /dev/null +++ b/index.min.js @@ -0,0 +1 @@ +!function(){var l,n,i;function s(t,e){if(t.classList)return e.forEach(function(e){t.classList.add(e)});t.className+=" "+e.join(" ")}function e(t,e){if(t.classList)return e.forEach(function(e){t.classList.remove(e)});t.className=t.className.replace(new RegExp("(^|\\b)"+e.join("|")+"(\\b|$)","gi")," ")}function r(){var e=navigator.userAgent.toLowerCase();return-1!==e.indexOf("msie")||-1!==e.indexOf("trident")||-1!==e.indexOf(" edge/")}function t(t){var e,i;this.element=null,this.autoshow=!1,this.createElements=!0,this.forceGemini=!1,this.onResize=null,this.minThumbSize=20,Object.keys(t||{}).forEach(function(e){this[e]=t[e]},this),(i=document.createElement("div")).style.position="absolute",i.style.top="-9999px",i.style.width="100px",i.style.height="100px",i.style.overflow="scroll",i.style.msOverflowStyle="scrollbar",document.body.appendChild(i),e=i.offsetWidth-i.clientWidth,document.body.removeChild(i),n=0===(l=e)&&!1===this.forceGemini,this._cache={events:{}},this._created=!1,this._cursorDown=!1,this._prevPageX=0,this._prevPageY=0,this._document=null,this._viewElement=this.element,this._scrollbarVerticalElement=null,this._thumbVerticalElement=null,this._scrollbarHorizontalElement=null,this._scrollbarHorizontalElement=null}i={element:"gm-scrollbar-container",verticalScrollbar:"gm-scrollbar -vertical",horizontalScrollbar:"gm-scrollbar -horizontal",thumb:"thumb",view:"gm-scroll-view",autoshow:"gm-autoshow",disable:"gm-scrollbar-disable-selection",prevented:"gm-prevented",resizeTrigger:"gm-resize-trigger"},t.prototype.create=function(){if(n){if(s(this.element,[i.prevented]),this.onResize){if(!0===this.createElements){for(this._viewElement=document.createElement("div");0