Debug information removed

This commit is contained in:
nobody 2021-02-21 20:36:50 +01:00
parent 3e8f47a627
commit 87466529c9
No known key found for this signature in database
GPG Key ID: 8F6DE3D614FCFD7A
3 changed files with 1 additions and 22 deletions

View File

@ -48,8 +48,7 @@ optionsBasic.init = function (opt) {
internalStatistics = options.getOptionElement(Setting.INTERNAL_STATISTICS);
internalStatistics.addEventListener('change', options.onOptionChanged);
internalStatistics.checked = true;// opt[Setting.INTERNAL_STATISTICS];
internalStatistics.checked = opt[Setting.INTERNAL_STATISTICS];
hideDonationButton = options.getOptionElement(Setting.HIDE_DONATION_BUTTON);
hideDonationButton.addEventListener('change', options.onOptionChanged);

View File

@ -84,10 +84,8 @@ optionsOther._setIcon = function (optionValue) {
optionsOther._preSelectStorage = function (type) {
if (type === 'local') {
document.getElementById('storage-type-local').checked = true;
optionsOther._storageSize(chrome.storage.local);
} else {
document.getElementById('storage-type-sync').checked = true;
optionsOther._storageSize(chrome.storage.sync);
}
};
@ -97,28 +95,11 @@ optionsOther._onStorageOptionChanged = function ({target}) {
});
if (target.value === 'local') {
storageManager.migrateData('local');
optionsOther._storageSize(chrome.storage.local);
} else {
storageManager.migrateData('sync');
optionsOther._storageSize(chrome.storage.sync);
}
};
optionsOther._storageSize = function (type) {
return new Promise((resolve) => {
type.get(null, function (items) {
let value = new TextEncoder().encode(Object.entries(items)
.map(([key, value]) => key + JSON.stringify(value))
.join('')).length;
value /= 1000;
// document.getElementById('storage-size').textContent = `${value.toLocaleString()} KB`;
console.log(`${value.toLocaleString()} KB`);
resolve();
});
});
};
optionsOther._colorPicker = function () {
/* eslint-disable no-undef, no-invalid-this */
const badgeBackgroundColor = new CP(document.getElementById('badged-background-color'));

View File

@ -262,7 +262,6 @@ options.onOptionChanged = function ({target}) {
optionsOther._setIcon(optionValue);
break;
case Setting.LOGGING:
console.log(optionValue);
if (optionValue === false) {
chrome.runtime.sendMessage({'topic': 'logs:delete', 'value': ''});
}