diff options
author | Jose Antonio Marquez | 2012-02-23 15:08:21 -0800 |
---|---|---|
committer | Jose Antonio Marquez | 2012-02-23 15:08:21 -0800 |
commit | 23b4bbd13345ecd5c00fda60b995a7fb2aab317c (patch) | |
tree | cf53e9ec1182872ec1653e2d0682b2c560118500 /js/controllers | |
parent | 287a0bad5b774a380ec6c8b3ddf24dc03234e248 (diff) | |
download | ninja-23b4bbd13345ecd5c00fda60b995a7fb2aab317c.tar.gz |
Fixing document mode check
Diffstat (limited to 'js/controllers')
-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 | } |