mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Split application data
This commit is contained in:
parent
3215c5f8d3
commit
1391648e1b
22 changed files with 186 additions and 130 deletions
|
|
@ -13,6 +13,7 @@
|
|||
$ = require('$'),
|
||||
ko = require('ko'),
|
||||
Autolinker = require('Autolinker'),
|
||||
JSON = require('JSON'),
|
||||
JSEncrypt = require('JSEncrypt'),
|
||||
|
||||
Mime = require('Common/Mime'),
|
||||
|
|
@ -1433,6 +1434,28 @@
|
|||
return (sResult === sFileName) ? '' : sResult;
|
||||
};
|
||||
|
||||
Utils.configurationScriptTagCache = {};
|
||||
|
||||
/**
|
||||
* @param {string} sConfiguration
|
||||
* @return {object}
|
||||
*/
|
||||
Utils.getConfigurationFromScriptTag = function (sConfiguration)
|
||||
{
|
||||
var oResult = {};
|
||||
|
||||
if (!Utils.configurationScriptTagCache[sConfiguration])
|
||||
{
|
||||
Utils.configurationScriptTagCache[sConfiguration] = $('script[type="application/json"][data-configuration="' + sConfiguration + '"]');
|
||||
}
|
||||
|
||||
try {
|
||||
oResult = JSON.parse(Utils.configurationScriptTagCache[sConfiguration].text());
|
||||
} catch (e) {/* eslint-disable-line no-empty */}
|
||||
|
||||
return oResult;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} sFileName
|
||||
* @return {string}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue