mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-05 07:27:04 +03:00
Made eslint using 'browser' environment and added globals, because RainLoop is used in browsers.
This also allowed to remove all webpack 'externals' overhead.
This commit is contained in:
parent
c3a213802d
commit
e7180a86ce
81 changed files with 1857 additions and 1259 deletions
|
|
@ -1,4 +1,3 @@
|
|||
import window from 'window';
|
||||
|
||||
// let rainloopCaches = window.caches && window.caches.open ? window.caches : null;
|
||||
|
||||
|
|
@ -12,9 +11,8 @@ export function jassl(src, async = false) {
|
|||
throw new Error('src should not be empty.');
|
||||
}
|
||||
|
||||
return new window.Promise((resolve, reject) => {
|
||||
const doc = window.document,
|
||||
element = doc.createElement('script');
|
||||
return new Promise((resolve, reject) => {
|
||||
const element = document.createElement('script');
|
||||
|
||||
element.onload = () => {
|
||||
resolve(src);
|
||||
|
|
@ -27,7 +25,7 @@ export function jassl(src, async = false) {
|
|||
element.async = !!async;
|
||||
element.src = src;
|
||||
|
||||
doc.body.appendChild(element);
|
||||
document.body.appendChild(element);
|
||||
}) /* .then((s) => {
|
||||
|
||||
const found = s && rainloopCaches ? s.match(/rainloop\/v\/([^\/]+)\/static\//) : null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue