Verified Commit d74879f3 authored by Thomas Rientjes's avatar Thomas Rientjes
Browse files

Introduce a non-default staging environment

parent 6f59a4cd
This diff is collapsed.
......@@ -60,7 +60,7 @@ interceptor.handleRequest = function (requestDetails, tabIdentifier, tab) {
return interceptor._handleMissingCandidate(requestDetails.url);
}
if (!files[targetPath]) {
if (!files.active[targetPath]) {
return interceptor._handleMissingCandidate(requestDetails.url);
}
......
......@@ -89,6 +89,8 @@ main._showReleaseNotes = function (details) {
*/
chrome.runtime.onInstalled.addListener(main._showReleaseNotes);
stateManager.setExtensionEnvironment('stable');
main._initializeOptions();
wrappers.setBadgeBackgroundColor({
......
......@@ -68,6 +68,17 @@ stateManager.registerInjection = function (tabIdentifier, injection) {
}
};
stateManager.setExtensionEnvironment = function (environment) {
switch (environment) {
case 'staging':
files.active = Object.assign({}, files.stable, files.staging);
break;
default:
files.active = files.stable;
}
};
stateManager.addDomainToWhitelist = function (domain) {
return new Promise((resolve) => {
......
Supports Markdown
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