-
Notifications
You must be signed in to change notification settings - Fork 1
/
e3_js.min.js
executable file
·1 lines (1 loc) · 2.66 KB
/
e3_js.min.js
1
!function(e,t,n,i){n.e3={version:"0.3.0",win:e(n),doc:e(i),breakpoints:[460,768,960,1280],load:{},behaviors:{},click:{},resize:{},scroll:{},delay:{},url:function(e){var t=n.location.href.split("?")[0].split("#")[0].split("/"),i=e+3;return"undefined"==typeof t[i]?!1:t[i]},getUrl:function(){for(var e=[],t=n.location.href.split("?")[0].split("/"),i=0;i<t.length;i++)i>2&&e.push(t[i]);return e},getQuery:function(){var e,t=[];if(n.location.href.indexOf("?")>-1){for(var i=n.location.href.split("?")[1].split("&"),r=0;r<i.length;r++)e=i[r].split("="),t.push(e[0]),t[e[0]]=e[1];return t}return!1},callEach:function(e){for(func in e)if(e.hasOwnProperty(func)&&e3.isFuncOf(func,e)){var t=[].slice.call(arguments,1);e[func].apply(e,t)}},isFuncOf:function(e,t){return"[object Function]"===Object.prototype.toString.call(t[e])}},e3.bpmobile=e3.breakpoints[0],e3.bptablet=e3.breakpoints[1],e3.bpdesktop=e3.breakpoints[2],e3.bphuge=e3.breakpoints[3],e3.load.timerInit=function(){e3.startTime=(new Date).getTime(),e3.timer=!0,e3.getTime=function(){1==e3.timer&&(e3.time=(((new Date).getTime()-e3.startTime)/1e3).toFixed(20),e3.callEach(e3.delay,e3.time))},setInterval(e3.getTime,1e3)},e3.load.init=function(){t.settings.e3&&e.extend(e3,t.settings.e3)},e3.doc.ready(function(){!function(){f(e3.callEach(e3.load));var e=e3.win.width(),t=e3.win.height();f(e3.callEach(e3.resize,e,t))}(),e3.win.click(u(function(e){e3.callEach(e3.click,e.toElement,e)},100)),e3.win.resize(u(function(){e3.callEach(e3.resize,e3.win.width(),e3.win.height())},250)),e3.win.scroll(u(function(){e3.callEach(e3.scroll,e3.win.scrollTop())},200))}),t.behaviors.e3={attach:function(e,t){!function(){e3.callEach(e3.behaviors,e,t)}()}};var r=function(){},l=function(e,t,n,i,r){if(!(i instanceof t))return e.apply(n,r);var l=a(e.prototype),c=e.apply(l,r);return o(c)?c:l},o=function(e){var t=typeof e;return"function"===t||"object"===t&&!!e},a=function(e){if(!o(e))return{};if(Object.create)return Object.create(e);r.prototype=e;var t=new r;return r.prototype=null,t},c=function(e){var t=Array.prototype.slice.call(arguments,1);return function n(){for(var i=0,r=t.slice(),o=0,a=r.length;a>o;o++)r[o]=arguments[i++];for(;i<arguments.length;)r.push(arguments[i++]);return l(e,n,this,this,r)}},u=function(e,t,n){var i,r,l,o=null,a=0,c=e3.time;n||(n={});var u=function(){a=n.leading===!1?0:c,o=null,l=e.apply(i,r),o||(i=r=null)};return function(){a||n.leading!==!1||(a=c);var s=t-(c-a);return i=this,r=arguments,0>=s||s>t?(o&&(clearTimeout(o),o=null),a=c,l=e.apply(i,r),o||(i=r=null)):o||n.trailing===!1||(o=setTimeout(u,s)),l}},s=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),1>=e&&(t=null),n}},f=c(s,2)}(jQuery,Drupal,this,this.document);