mirror of
https://bitbucket.org/skobkin/chrome_point_plus.git
synced 2024-11-23 18:56:04 +00:00
Fix codestyle in options.js
This commit is contained in:
parent
98982c6145
commit
bd2aa28afc
|
@ -40,7 +40,8 @@ OptionsPage.prototype.updateOptionsFromFrom = function() {
|
||||||
}, function() {
|
}, function() {
|
||||||
console.log('Default options initialized. Version upgraded to %s.', this.version);
|
console.log('Default options initialized. Version upgraded to %s.', this.version);
|
||||||
|
|
||||||
if ( ! confirm(chrome.i18n.getMessage('options_text_new_version'))) {
|
/* global confirm */
|
||||||
|
if (! confirm(chrome.i18n.getMessage('options_text_new_version'))) {
|
||||||
window.close();
|
window.close();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -127,7 +128,7 @@ OptionsPage.prototype.updateOptionFromInput = function(input) {
|
||||||
this._options[key] = {
|
this._options[key] = {
|
||||||
type: 'plain',
|
type: 'plain',
|
||||||
value: input.value
|
value: input.value
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -188,11 +189,14 @@ OptionsPage.prototype.checkOldStyle = function() {
|
||||||
console.log('Found old-style options. Cleaning...');
|
console.log('Found old-style options. Cleaning...');
|
||||||
|
|
||||||
chrome.storage.sync.get(null, function(data) {
|
chrome.storage.sync.get(null, function(data) {
|
||||||
|
var option;
|
||||||
|
|
||||||
console.log('Old data: %O', data);
|
console.log('Old data: %O', data);
|
||||||
|
|
||||||
for (option in data) {
|
for (option in data) {
|
||||||
chrome.storage.sync.remove(option);
|
if (data.hasOwnProperty(option)) {
|
||||||
|
chrome.storage.sync.remove(option);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('All old data removed');
|
console.log('All old data removed');
|
||||||
|
|
Loading…
Reference in a new issue