From 79da052891a3d8cfb70489edb71619f27bfe3939 Mon Sep 17 00:00:00 2001 From: John Mayhew Date: Wed, 22 Feb 2012 13:45:28 -0800 Subject: Fix for bug that keeps Ninja from launching over HTTP. We need to wrap any extension specific code in an if (window.chrome.app.isInstalled) check. --- js/controllers/document-controller.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index 7491ef9f..fa611de4 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js @@ -85,7 +85,9 @@ var DocumentController = exports.DocumentController = Montage.create(Component, handleAppLoaded: { value: function() { //Adding an intercept to resources loaded to ensure user assets load from cloud simulator - chrome.webRequest.onBeforeRequest.addListener(this.handleWebRequest.bind(this), {urls: [""]}, ["blocking"]); + if (window.chrome.app.isInstalled) { + chrome.webRequest.onBeforeRequest.addListener(this.handleWebRequest.bind(this), {urls: [""]}, ["blocking"]); + } } }, //////////////////////////////////////////////////////////////////// -- cgit v1.2.3