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 queue(name){ | |
| queue.q[name]++ || (queue.q[name] = 1); | |
| return function(err){ | |
| if (err && queue.e[name]) queue.e[name](err); | |
| else if (err) throw err; | |
| process.nextTick(function(){ | |
| queue.q[name]--; | |
| queue.check(name); | |
| }); | |
| } |
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
| var args = Array.apply([], arguments ) |
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 getGroupCallBackGenerator(timeOut,finalCallback){ | |
| var waitingStatus={}; | |
| var resultObject={}; | |
| var started=false; | |
| var timedOut=false; | |
| var timer=setTimeout(function(){ | |
| timedOut=true; | |
| if(typeof(finalCallback)=="function"){ | |
| finalCallback(resultObject); | |
| } |
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() { | |
| if ("-ms-user-select" in document.documentElement.style && navigator.userAgent.match(/IEMobile/)) { | |
| var msViewportStyle = document.createElement("style"); | |
| msViewportStyle.appendChild( | |
| document.createTextNode("@-ms-viewport{width:auto!important}") | |
| ); | |
| document.getElementsByTagName("head")[0].appendChild(msViewportStyle); | |
| } | |
| })(); |
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 getGroupCallBackGenerator(timeOut,finalCallback){ | |
| var waitingStatus={}; | |
| var resultObject={}; | |
| var started=false; | |
| var timedOut=false; | |
| var timer=setTimeout(function(){ | |
| timedOut=true; | |
| if(typeof(finalCallback)=="function"){ | |
| finalCallback(resultObject); | |
| } |
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
| var HashHack = { | |
| PREFIX: '#hhMessage=', | |
| aCallbacks: [], | |
| sLastHash: '', | |
| handleInterval: function() { | |
| var sHash = window.location.hash, | |
| sDecodedHash, sMessage, i; | |
| if (sHash !== HashHack.sLastHash) { |
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
| var HashHack = { | |
| PREFIX: '#hhMessage=', | |
| postMessage: function(el, sMessage) { | |
| if ('string' === typeof el) { | |
| el = document.getElementById(el); | |
| } | |
| var sUrl = el.src.replace(/#.*/, ''); | |
| el.src = sUrl + HashHack.PREFIX + encodeURIComponent(sMessage); |
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 getDocHeight() { | |
| var D = document; | |
| return Math.max( | |
| Math.max(D.body.scrollHeight, D.documentElement.scrollHeight), | |
| Math.max(D.body.offsetHeight, D.documentElement.offsetHeight), | |
| Math.max(D.body.clientHeight, D.documentElement.clientHeight) | |
| ); | |
| } |
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
| app.directive('ngEnter', function() { | |
| return function(scope, element, attrs) { | |
| element.bind("keydown keypress", function(event) { | |
| if(event.which === 13) { | |
| scope.$apply(function(){ | |
| scope.$eval(attrs.ngEnter); | |
| }); | |
| event.preventDefault(); | |
| } |
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
| _script.onload = _script.onreadystatechange = function () { | |
| var uA = navigator.userAgent.toLowerCase(); | |
| if (!(!(uA.indexOf("opera") != -1) && uA.indexOf("msie") != -1) || /loaded|complete/i.test(this.readyState)) { | |
| if (typeof onload == "function") { | |
| onload(); | |
| } | |
| complete(_jsonpLoadState == "loaded" ? reportSuccessCode : reportErrorCode); | |
| } | |
| }; |