diff --git a/core/constants.js b/core/constants.js index 5bbc13e9d0dfefe99b3f150c615880496d10ecff..fd4691e5882ef7cd5adbdd715774e40d78ce8970 100644 --- a/core/constants.js +++ b/core/constants.js @@ -53,6 +53,7 @@ const Setting = { 'AMOUNT_INJECTED': 'amountInjected', 'BLOCK_MISSING': 'blockMissing', 'DISABLE_PREFETCH': 'disablePrefetch', + 'ENFORCE_STAGING': 'enforceStaging', 'SHOW_ICON_BADGE': 'showIconBadge', 'SHOW_RELEASE_NOTES': 'showReleaseNotes', 'STRIP_METADATA': 'stripMetadata', diff --git a/core/main.js b/core/main.js index fddfd4276bae0b89af6f91d16d6c853551bc2f6f..05f627e6a7b93d0b17319fdcb219425dce87d4ed 100644 --- a/core/main.js +++ b/core/main.js @@ -30,6 +30,7 @@ main._initializeOptions = function () { [Setting.SHOW_ICON_BADGE]: true, [Setting.BLOCK_MISSING]: false, [Setting.DISABLE_PREFETCH]: true, + [Setting.ENFORCE_STAGING]: false, [Setting.STRIP_METADATA]: true, [Setting.WHITELISTED_DOMAINS]: {} }; @@ -37,7 +38,13 @@ main._initializeOptions = function () { chrome.storage.local.get(optionDefaults, function (options) { if (options === null) { - options = optionDefaults; + options = optionDefaults; // Restore option defaults. + } + + if (options.enforceStaging === true) { + + // Improve coverage at the cost of website stability. + stateManager.setExtensionEnvironment('staging'); } if (options.disablePrefetch !== false) {