diff --git a/chrome_point_plus/js/options.js b/chrome_point_plus/js/options.js index 1da0a12..b2d5324 100644 --- a/chrome_point_plus/js/options.js +++ b/chrome_point_plus/js/options.js @@ -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() diff --git a/chrome_point_plus/manifest.json b/chrome_point_plus/manifest.json index 3e11b7e..4bb9aa8 100644 --- a/chrome_point_plus/manifest.json +++ b/chrome_point_plus/manifest.json @@ -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",