mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +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,5 +1,3 @@
|
|||
/* eslint-env browser */
|
||||
|
||||
const STORAGE_KEY = '__rlA';
|
||||
const TIME_KEY = '__rlT';
|
||||
|
||||
|
|
@ -16,7 +14,7 @@ export function isStorageSupported(storageName) {
|
|||
|
||||
if (storageIsAvailable) {
|
||||
const s = window[storageName],
|
||||
key = 'testLocalStorage_' + window.Math.random();
|
||||
key = 'testLocalStorage_' + Math.random();
|
||||
|
||||
try {
|
||||
s.setItem(key, key);
|
||||
|
|
@ -40,7 +38,7 @@ const __get = (key) => {
|
|||
} else if (WIN_STORAGE) {
|
||||
const data =
|
||||
WIN_STORAGE.name && '{' === WIN_STORAGE.name.toString()[0]
|
||||
? window.JSON.parse(WIN_STORAGE.name.toString())
|
||||
? JSON.parse(WIN_STORAGE.name.toString())
|
||||
: null;
|
||||
result = data ? data[key] || null : null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue