diff options
Diffstat (limited to 'js')
-rwxr-xr-x | js/controllers/document-controller.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index 3a77ed5f..d5d0cf42 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js | |||
@@ -86,8 +86,12 @@ var DocumentController = exports.DocumentController = Montage.create(Component, | |||
86 | // | 86 | // |
87 | handleAppLoaded: { | 87 | handleAppLoaded: { |
88 | value: function() { | 88 | value: function() { |
89 | //Checking for app not to be loaded via http/https to add app only listener | 89 | //Checking for app to be loaded through extension |
90 | if (window.location.protocol !== 'http:' && window.location.protocol !== 'https:') { | 90 | var check; |
91 | if (chrome && chrome.app) { | ||
92 | check = chrome.app.getDetails(); | ||
93 | } | ||
94 | if (check !== null) { | ||
91 | //Adding an intercept to resources loaded to ensure user assets load from cloud simulator | 95 | //Adding an intercept to resources loaded to ensure user assets load from cloud simulator |
92 | chrome.webRequest.onBeforeRequest.addListener(this.handleWebRequest.bind(this), {urls: ["<all_urls>"]}, ["blocking"]); | 96 | chrome.webRequest.onBeforeRequest.addListener(this.handleWebRequest.bind(this), {urls: ["<all_urls>"]}, ["blocking"]); |
93 | } | 97 | } |