mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 16:37:02 +03:00
Added async script loader
This commit is contained in:
parent
9a30680748
commit
25cf891037
23 changed files with 1200 additions and 342 deletions
2
vendors/rl/rl-1.0.min.js
vendored
2
vendors/rl/rl-1.0.min.js
vendored
|
|
@ -1,2 +0,0 @@
|
|||
/*! RainLoop Top Driver v1.0 (c) 2013 RainLoop Team; Licensed under MIT */
|
||||
!function(t,h){function s(){}s.prototype.s=t.sessionStorage,s.prototype.t=t.top||t,s.prototype.getHash=function(){var t=null;if(this.s)t=this.s.getItem("__rlA")||null;else if(this.t){var s=this.t.name&&h&&"{"===this.t.name.toString().substr(0,1)?h.parse(this.t.name.toString()):null;t=s?s.__rlA||null:null}return t},s.prototype.setHash=function(){var s=t.rainloopAppData,n=null;this.s?this.s.setItem("__rlA",s&&s.AuthAccountHash?s.AuthAccountHash:""):this.t&&h&&(n={},n.__rlA=s&&s.AuthAccountHash?s.AuthAccountHash:"",this.t.name=h.stringify(n))},s.prototype.clearHash=function(){this.s?this.s.setItem("__rlA",""):this.t&&(this.t.name="")},t._rlhh=new s,t.__rlah=function(){return t._rlhh?t._rlhh.getHash():null},t.__rlah_set=function(){t._rlhh&&t._rlhh.setHash()},t.__rlah_clear=function(){t._rlhh&&t._rlhh.clearHash()}}(window,window.JSON);
|
||||
2
vendors/rl/rl-1.1.min.js
vendored
Normal file
2
vendors/rl/rl-1.1.min.js
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
/*! RainLoop Index Helper v1.1 (c) 2014 RainLoop Team; Licensed under MIT */
|
||||
!function(t,n){function e(){}e.prototype.s=t.sessionStorage,e.prototype.t=t.top||t,e.prototype.getHash=function(){var t=null;if(this.s)t=this.s.getItem("__rlA")||null;else if(this.t){var e=this.t.name&&n&&"{"===this.t.name.toString().substr(0,1)?n.parse(this.t.name.toString()):null;t=e?e.__rlA||null:null}return t},e.prototype.setHash=function(){var e=t.rainloopAppData,s=null;this.s?this.s.setItem("__rlA",e&&e.AuthAccountHash?e.AuthAccountHash:""):this.t&&n&&(s={},s.__rlA=e&&e.AuthAccountHash?e.AuthAccountHash:"",this.t.name=n.stringify(s))},e.prototype.clearHash=function(){this.s?this.s.setItem("__rlA",""):this.t&&(this.t.name="")},t._rlhh=new e,t.__rlah=function(){return t._rlhh?t._rlhh.getHash():null},t.__rlah_set=function(){t._rlhh&&t._rlhh.setHash()},t.__rlah_clear=function(){t._rlhh&&t._rlhh.clearHash()},t.__includeScr=function(t){document.write(unescape('%3Cscript data-cfasync="false" type="text/javascript" src="'+t+'"%3E%3C/script%3E'))},t.__showError=function(){var n=document.getElementById("rl-loading"),e=document.getElementById("rl-loading-error");n&&(n.style.display="none"),e&&(e.style.display="block"),t.SimplePace&&t.SimplePace.set(100)},t.__simplePace=function(n){t.SimplePace&&t.SimplePace.add(n)},t.__runBoot=function(n){t.__RLBOOT&&!n?t.__RLBOOT(function(t){t||__showError()}):__showError()}}(window,window.JSON);
|
||||
37
vendors/rl/rl.js
vendored
37
vendors/rl/rl.js
vendored
|
|
@ -1,4 +1,4 @@
|
|||
/*! RainLoop Top Driver v1.0 (c) 2013 RainLoop Team; Licensed under MIT */
|
||||
/*! RainLoop Index Helper v1.1 (c) 2013 RainLoop Team; Licensed under MIT */
|
||||
(function (window, JSON) {
|
||||
|
||||
/**
|
||||
|
|
@ -51,14 +51,49 @@
|
|||
window['__rlah'] = function () {
|
||||
return window['_rlhh'] ? window['_rlhh']['getHash']() : null;
|
||||
};
|
||||
|
||||
window['__rlah_set'] = function () {
|
||||
if (window['_rlhh']) {
|
||||
window['_rlhh']['setHash']();
|
||||
}
|
||||
};
|
||||
|
||||
window['__rlah_clear'] = function () {
|
||||
if (window['_rlhh']) {
|
||||
window['_rlhh']['clearHash']();
|
||||
}
|
||||
};
|
||||
|
||||
// index function
|
||||
window['__includeScr'] = function (sSrc) {
|
||||
document.write(unescape('%3Csc' + 'ript data-cfasync="false" type="text/jav' + 'ascr' + 'ipt" sr' + 'c="' + sSrc + '"%3E%3C/' + 'scr' + 'ipt%3E'));
|
||||
};
|
||||
|
||||
window['__showError'] = function () {
|
||||
var oR = document.getElementById('rl-loading'),
|
||||
oL = document.getElementById('rl-loading-error');
|
||||
|
||||
if (oR) {oR.style.display = 'none';}
|
||||
if (oL) {oL.style.display = 'block';}
|
||||
if (window.SimplePace) {window.SimplePace.set(100);}
|
||||
};
|
||||
|
||||
window['__simplePace'] = function (nVal) {
|
||||
if (window.SimplePace) {
|
||||
window.SimplePace.add(nVal);
|
||||
}
|
||||
};
|
||||
|
||||
window['__runBoot'] = function (bWithError) {
|
||||
if (window.__RLBOOT && !bWithError) {
|
||||
window.__RLBOOT(function (bV) {
|
||||
if (!bV) {
|
||||
__showError();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
__showError();
|
||||
}
|
||||
};
|
||||
|
||||
}(window, window.JSON));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue