snappymail/dev/boot.js

38 lines
851 B
JavaScript
Raw Normal View History

2016-05-06 23:14:40 +08:00
import window from 'window';
import elementDatasetPolyfill from 'element-dataset';
2016-05-26 06:38:32 +08:00
2018-05-16 22:31:45 +08:00
import 'es6-object-assign/auto';
2016-05-21 06:46:56 +08:00
import {Promise} from 'es6-promise-polyfill/promise.js';
2018-03-30 05:43:46 +08:00
import {progressJs} from '../vendors/Progress.js/src/progress.js';
2016-05-20 08:04:15 +08:00
2016-05-21 06:46:56 +08:00
window.Promise = window.Promise || Promise;
2016-05-20 08:04:15 +08:00
window.progressJs = window.progressJs || progressJs();
window.progressJs.onbeforeend(() => {
2016-05-26 06:38:32 +08:00
const _$ = window.$;
if (_$)
2016-05-20 08:04:15 +08:00
{
try {
_$('.progressjs-container').hide();
window.setTimeout(() => {
_$('.progressjs-container').remove();
}, 200); // eslint-disable-line no-magic-numbers
}
catch (e) {} // eslint-disable-line no-empty
2016-05-20 08:04:15 +08:00
}
});
2016-05-06 23:14:40 +08:00
elementDatasetPolyfill();
require('json3');
2017-09-21 06:18:41 +08:00
require('intersection-observer');
2016-05-26 06:38:32 +08:00
require('../vendors/modernizr/modernizr-custom.js');
2016-08-11 07:34:09 +08:00
require('Common/Booter');
2016-05-06 23:14:40 +08:00
2016-05-20 08:04:15 +08:00
if (window.__runBoot)
{
window.__runBoot();
}