mirror of
https://codeberg.org/nobody/LocalCDN.git
synced 2025-02-14 02:40:46 +01:00
Checks improved
This commit is contained in:
parent
25638f8a44
commit
6655c8cd98
@ -33,8 +33,8 @@ main._initializeSettings = function () {
|
|||||||
|
|
||||||
storageManager.type.get(null, function (items) {
|
storageManager.type.get(null, function (items) {
|
||||||
// Delete old keys
|
// Delete old keys
|
||||||
if (typeof items.whitelistedDomains !== 'undefined') {
|
if (items.whitelistedDomains !== undefined) {
|
||||||
if (typeof items.allowlistedDomains === 'undefined' || Object.keys(items.allowlistedDomains).length === 0) {
|
if (items.allowlistedDomains === undefined || Object.keys(items.allowlistedDomains).length === 0) {
|
||||||
items['allowlistedDomains'] = items.whitelistedDomains;
|
items['allowlistedDomains'] = items.whitelistedDomains;
|
||||||
}
|
}
|
||||||
delete items['whitelistedDomains'];
|
delete items['whitelistedDomains'];
|
||||||
@ -42,7 +42,7 @@ main._initializeSettings = function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Convert value of notifications
|
// Convert value of notifications
|
||||||
if (typeof items.hideReleaseNotes !== 'undefined') {
|
if (items.hideReleaseNotes !== undefined) {
|
||||||
if (items.hideReleaseNotes === true) {
|
if (items.hideReleaseNotes === true) {
|
||||||
items.updateNotification = 0;
|
items.updateNotification = 0;
|
||||||
} else {
|
} else {
|
||||||
|
@ -137,13 +137,13 @@ storageManager._validation = function (content) {
|
|||||||
let imported = {};
|
let imported = {};
|
||||||
|
|
||||||
// Delete old keys
|
// Delete old keys
|
||||||
if (typeof content.whitelistedDomains !== 'undefined') {
|
if (content.whitelistedDomains !== undefined) {
|
||||||
content.allowlistedDomains = content.whitelistedDomains;
|
content.allowlistedDomains = content.whitelistedDomains;
|
||||||
delete content['whitelistedDomains'];
|
delete content['whitelistedDomains'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert value of notifications
|
// Convert value of notifications
|
||||||
if (typeof content.hideReleaseNotes !== 'undefined') {
|
if (content.hideReleaseNotes !== undefined) {
|
||||||
content.updateNotification = content.hideReleaseNotes ? 0 : 2;
|
content.updateNotification = content.hideReleaseNotes ? 0 : 2;
|
||||||
delete content['hideReleaseNotes'];
|
delete content['hideReleaseNotes'];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user