Microsoft has acquired GitHub. Decentraleyes has left GitHub. Welcome to its new home!

To participate, please register, or sign in with an existing GitLab.com, Bitbucket, or GitHub account.

Past contributions on GitHub? Be sure to reclaim your Comments, Issues, and Pull Requests.

Verified Commit 9508a3a3 authored by Thomas Rientjes's avatar Thomas Rientjes
Browse files

Enable users to manually enforce staging

parent d74879f3
......@@ -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',
......
......@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment