aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/document-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/controllers/document-controller.js')
-rwxr-xr-xjs/controllers/document-controller.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js
index 7491ef9f..1c9d9d59 100755
--- a/js/controllers/document-controller.js
+++ b/js/controllers/document-controller.js
@@ -84,8 +84,15 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
84 // 84 //
85 handleAppLoaded: { 85 handleAppLoaded: {
86 value: function() { 86 value: function() {
87 //Adding an intercept to resources loaded to ensure user assets load from cloud simulator 87 //Checking for app to be loaded through extension
88 chrome.webRequest.onBeforeRequest.addListener(this.handleWebRequest.bind(this), {urls: ["<all_urls>"]}, ["blocking"]); 88 var check;
89 if (chrome && chrome.app) {
90 check = chrome.app.getDetails();
91 }
92 if (check !== null) {
93 //Adding an intercept to resources loaded to ensure user assets load from cloud simulator
94 chrome.webRequest.onBeforeRequest.addListener(this.handleWebRequest.bind(this), {urls: ["<all_urls>"]}, ["blocking"]);
95 }
89 } 96 }
90 }, 97 },
91 //////////////////////////////////////////////////////////////////// 98 ////////////////////////////////////////////////////////////////////