diff options
author | Ananya Sen | 2012-02-23 17:57:06 -0800 |
---|---|---|
committer | Ananya Sen | 2012-02-23 17:57:06 -0800 |
commit | a23455a887982d306d794b6afca497259cfa7f4a (patch) | |
tree | 7396eb7b5e0759035f666a7eee9d325979887d4a /js/controllers | |
parent | 6e66f411ba02eaaeb33471115345ecf3c7ce4ce9 (diff) | |
parent | 97d6314f96f309332a655d49b95ec651c378bcf2 (diff) | |
download | ninja-a23455a887982d306d794b6afca497259cfa7f4a.tar.gz |
Merge branch 'refs/heads/FileIO-jose' into FileIO
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 6f7d098f..e221df68 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 | } |