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

Introduce a non-default staging environment

parent 6f59a4cd
......@@ -19,6 +19,9 @@
var files = {
// Files [Stable]
'stable': {
// AngularJS
'resources/angularjs/1.0.1/angular.min.jsm': true,
'resources/angularjs/1.0.2/angular.min.jsm': true,
......@@ -259,4 +262,8 @@ var files = {
'resources/webfont/1.5.6/webfont.jsm': true,
'resources/webfont/1.5.10/webfont.jsm': true,
'resources/webfont/1.5.18/webfont.jsm': true
},
// Files [Staging]
'staging': {}
};
......@@ -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