1
0
mirror of https://codeberg.org/nobody/LocalCDN.git synced 2024-12-23 00:25:15 +01:00

Import validation extended (#92)

This commit is contained in:
nobody 2020-09-08 20:47:55 +02:00
parent 0491b1cfb9
commit 6a80106def
No known key found for this signature in database
GPG Key ID: 8F6DE3D614FCFD7A

View File

@ -139,8 +139,10 @@ storageManager._validation = function (content) {
imported[key] = storageManager._validateDomainsAndStatistics(key, content[key]);
} else if (typeof value === 'string' || value instanceof String) {
imported[key] = storageManager._validateStrings(content[key]);
} else if ((typeof value === 'number' || value instanceof Number) && key !== 'amountInjected') {
} else if (typeof value === 'number' || value instanceof Number) {
imported[key] = storageManager._validateNumbers(content[key]);
} else if (typeof value === 'boolean' || value instanceof Boolean) {
imported[key] = content[key];
}
} else {
alert(chrome.i18n.getMessage('dialogImportFailed'));