aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorValerio Virgillito2012-02-23 15:07:28 -0800
committerValerio Virgillito2012-02-23 15:07:28 -0800
commit41b69af7c0be3dd5fe4f772668862696af8b917a (patch)
treea81d79c9e2c9365de7f20cc8ec54cc6143f3e3f2 /js
parent24a5f2b497fd3e78d5342e7566838e78dcfa8746 (diff)
downloadninja-41b69af7c0be3dd5fe4f772668862696af8b917a.tar.gz
Fixing app mode check.
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js')
-rwxr-xr-xjs/controllers/document-controller.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js
index fa611de4..1c9d9d59 100755
--- a/js/controllers/document-controller.js
+++ b/js/controllers/document-controller.js
@@ -84,8 +84,13 @@ 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 if (window.chrome.app.isInstalled) { 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
89 chrome.webRequest.onBeforeRequest.addListener(this.handleWebRequest.bind(this), {urls: ["<all_urls>"]}, ["blocking"]); 94 chrome.webRequest.onBeforeRequest.addListener(this.handleWebRequest.bind(this), {urls: ["<all_urls>"]}, ["blocking"]);
90 } 95 }
91 } 96 }