mirror of
https://codeberg.org/nobody/LocalCDN.git
synced 2025-02-10 17:00:54 +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) {
|
||||
// Delete old keys
|
||||
if (typeof items.whitelistedDomains !== 'undefined') {
|
||||
if (typeof items.allowlistedDomains === 'undefined' || Object.keys(items.allowlistedDomains).length === 0) {
|
||||
if (items.whitelistedDomains !== undefined) {
|
||||
if (items.allowlistedDomains === undefined || Object.keys(items.allowlistedDomains).length === 0) {
|
||||
items['allowlistedDomains'] = items.whitelistedDomains;
|
||||
}
|
||||
delete items['whitelistedDomains'];
|
||||
@ -42,7 +42,7 @@ main._initializeSettings = function () {
|
||||
}
|
||||
|
||||
// Convert value of notifications
|
||||
if (typeof items.hideReleaseNotes !== 'undefined') {
|
||||
if (items.hideReleaseNotes !== undefined) {
|
||||
if (items.hideReleaseNotes === true) {
|
||||
items.updateNotification = 0;
|
||||
} else {
|
||||
|
@ -137,13 +137,13 @@ storageManager._validation = function (content) {
|
||||
let imported = {};
|
||||
|
||||
// Delete old keys
|
||||
if (typeof content.whitelistedDomains !== 'undefined') {
|
||||
if (content.whitelistedDomains !== undefined) {
|
||||
content.allowlistedDomains = content.whitelistedDomains;
|
||||
delete content['whitelistedDomains'];
|
||||
}
|
||||
|
||||
// Convert value of notifications
|
||||
if (typeof content.hideReleaseNotes !== 'undefined') {
|
||||
if (content.hideReleaseNotes !== undefined) {
|
||||
content.updateNotification = content.hideReleaseNotes ? 0 : 2;
|
||||
delete content['hideReleaseNotes'];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user