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.

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) => {
......
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