From f0392fb5a05c5d4b3dd37ebc64c1dee2c2b6b848 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 21 Mar 2012 17:22:47 -0700 Subject: Changes to the webrequest blocking and adding a google.com permission workaround Signed-off-by: Valerio Virgillito --- js/controllers/document-controller.js | 7 +++---- manifest.json | 5 ++++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index 3db4c7d4..539fd13e 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js @@ -72,8 +72,7 @@ var DocumentController = exports.DocumentController = Montage.create(Component, - - /* + //////////////////////////////////////////////////////////////////// // handleWebRequest: { @@ -81,7 +80,7 @@ var DocumentController = exports.DocumentController = Montage.create(Component, //TODO: Check if frameId is proper if (this._hackRootFlag && request.parentFrameId !== -1) { //TODO: Optimize creating string - console.log(request); + //console.log(request); //console.log(this.application.ninja.coreIoApi.rootUrl+this.application.ninja.documentController.documentHackReference.root.split(this.application.ninja.coreIoApi.cloudData.root)[1], request.url); //return {redirectUrl: this.application.ninja.coreIoApi.rootUrl+this.application.ninja.documentController.documentHackReference.root.split(this.application.ninja.coreIoApi.cloudData.root)[1]+request.url.split('/')[request.url.split('/').length-1]}; return {redirectUrl: this.application.ninja.coreIoApi.rootUrl+this.application.ninja.documentController.documentHackReference.root.split(this.application.ninja.coreIoApi.cloudData.root)[1]+request.url.split(chrome.extension.getURL('js/document/templates/montage-html/'))[1]}; @@ -104,7 +103,7 @@ var DocumentController = exports.DocumentController = Montage.create(Component, } }, //////////////////////////////////////////////////////////////////// -*/ + diff --git a/manifest.json b/manifest.json index 0500101b..50e1cba1 100644 --- a/manifest.json +++ b/manifest.json @@ -12,7 +12,10 @@ }, "permissions": [ "unlimitedStorage", - "notifications" + "notifications", + "webRequest", + "webRequestBlocking", + "http://www.google.com/*" ], "requirements": { "3D": { -- cgit v1.2.3