Created
May 15, 2015 18:51
-
-
Save shinigamicorei7/3f0d16190ad6cf7034b1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
var MatrixDevelopmentsApp; | |
MatrixDevelopmentsApp = function () { | |
this.init = []; | |
this.plugins = {}; | |
this.settings = {}; | |
this.localStorageSupported = typeof window.Storage !== "undefined" ? true : false; | |
return this; | |
}; | |
MatrixDevelopmentsApp.prototype.start = function (init, settings) { | |
if (init == null) { | |
init = []; | |
} | |
if (settings == null) { | |
settings = {}; | |
} | |
window.onload = (function (_this) { | |
return function () { | |
var initilizer, _i, _len, _ref; | |
$('html').addClass('pxajs'); | |
if (init.length > 0) { | |
$.merge(_this.init, init); | |
} | |
_this.settings = $.extend(true, {}, settings || {}); | |
_this.settings.is_mobile = /iphone|ipad|ipod|android|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase()); | |
if (_this.settings.is_mobile) { | |
if (FastClick) { | |
FastClick.attach(document.body); | |
} | |
} | |
_ref = _this.init; | |
for (_i = 0, _len = _ref.length; _i < _len; _i++) { | |
initilizer = _ref[_i]; | |
$.proxy(initilizer, _this)(); | |
} | |
$(window).trigger("pa.loaded"); | |
return $(window).resize(); | |
}; | |
})(this); | |
return this; | |
}; | |
MatrixDevelopmentsApp.Constructor = MatrixDevelopmentsApp; | |
window.MatrixDevelopments = new MatrixDevelopmentsApp; | |
}).call(this); | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment