aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/document-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/controllers/document-controller.js')
-rwxr-xr-xjs/controllers/document-controller.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js
index b1a22c1b..9785d824 100755
--- a/js/controllers/document-controller.js
+++ b/js/controllers/document-controller.js
@@ -56,12 +56,37 @@ DocumentController = exports.DocumentController = Montage.create(Component, {
56 this.eventManager.addEventListener("executeSave", this, false); 56 this.eventManager.addEventListener("executeSave", this, false);
57 57
58 this.eventManager.addEventListener("recordStyleChanged", this, false); 58 this.eventManager.addEventListener("recordStyleChanged", this, false);
59
60
61
59 } 62 }
60 }, 63 },
64
65
66 handleWebRequest: {
67 value: function (request) {
68 if (request.url.indexOf('js/document/templates/montage-html') !== -1) {
69
70 console.log(request);
71
72 //TODO: Figure out why active document is not available here
73
74 /*
75if (request.url.indexOf('calculator.css') !== -1) {
76 return {redirectUrl: this.application.ninja.coreIoApi.rootUrl+'/calculator/components/calculator.reel/calculator.css'};
77 }
78*/
79 }
80 }
81 },
82
61 83
62 handleAppLoaded: { 84 handleAppLoaded: {
63 value: function() { 85 value: function() {
64 // 86 //
87
88 chrome.webRequest.onBeforeRequest.addListener(this.handleWebRequest.bind(this), {urls: ["<all_urls>"]}, ["blocking"]);
89
65 } 90 }
66 }, 91 },
67 92