Debug information removed
This commit is contained in:
parent
3e8f47a627
commit
87466529c9
|
@ -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);
|
||||
|
|
|
@ -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'));
|
||||
|
|
|
@ -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': ''});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue