This commit is contained in:
Alexey Skobkin 2014-11-26 23:07:12 +04:00
parent 699fd726c4
commit b607c04045
2 changed files with 25 additions and 19 deletions

View file

@ -103,26 +103,32 @@ function pp_restore_options() {
}
});
// Loading options
chrome.storage.sync.get('options', function(options) {
// Setting options in DOM
$.each(options.options, function(key, data) {
switch (data.type) {
case 'boolean':
if (data.value) {
$('#' + key.replace(/_/g, '-')).prop('checked', true);
// Loading options
chrome.storage.sync.get('options', function(options) {
try {
// Setting options in DOM
$.each(options.options, function(key, data) {
switch (data.type) {
case 'boolean':
if (data.value) {
$('#' + key.replace(/_/g, '-')).prop('checked', true);
}
break;
case 'enum':
$('.option-node .option-enum[name="' + key.replace(/_/g, '-') + '"][value="' + data.value + '"]').prop('checked', true);
break;
default:
console.warn('Invalid option "%s" type: %O', key, data);
break;
}
break;
case 'enum':
$('.option-node .option-enum[name="' + key.replace(/_/g, '-') + '"][value="' + data.value + '"]').prop('checked', true);
break;
default:
console.warn('Invalid option "%s" type: %O', key, data);
break;
});
} catch (ex) {
console.error('Error while loading extension options: %O', ex);
}
});
// Showing version
$('#pp-version').html('Point+ ' + getVersion()

View file

@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Point+",
"version": "1.17.2",
"version": "1.17.3",
"default_locale": "ru",
"author": "__MSG_ext_author__",
"homepage_url": "https://bitbucket.org/skobkin/chrome_point_plus",