aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xjs/controllers/document-controller.js5
-rwxr-xr-xjs/io/system/coreioapi.js4
-rw-r--r--manifest.json4
3 files changed, 7 insertions, 6 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js
index 7d982a62..3db4c7d4 100755
--- a/js/controllers/document-controller.js
+++ b/js/controllers/document-controller.js
@@ -73,13 +73,15 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
73 73
74 74
75 75
76 //////////////////////////////////////////////////////////////////// 76 /*
77////////////////////////////////////////////////////////////////////
77 // 78 //
78 handleWebRequest: { 79 handleWebRequest: {
79 value: function (request) { 80 value: function (request) {
80 //TODO: Check if frameId is proper 81 //TODO: Check if frameId is proper
81 if (this._hackRootFlag && request.parentFrameId !== -1) { 82 if (this._hackRootFlag && request.parentFrameId !== -1) {
82 //TODO: Optimize creating string 83 //TODO: Optimize creating string
84 console.log(request);
83 //console.log(this.application.ninja.coreIoApi.rootUrl+this.application.ninja.documentController.documentHackReference.root.split(this.application.ninja.coreIoApi.cloudData.root)[1], request.url); 85 //console.log(this.application.ninja.coreIoApi.rootUrl+this.application.ninja.documentController.documentHackReference.root.split(this.application.ninja.coreIoApi.cloudData.root)[1], request.url);
84 //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]}; 86 //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]};
85 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]}; 87 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]};
@@ -102,6 +104,7 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
102 } 104 }
103 }, 105 },
104 //////////////////////////////////////////////////////////////////// 106 ////////////////////////////////////////////////////////////////////
107*/
105 108
106 109
107 110
diff --git a/js/io/system/coreioapi.js b/js/io/system/coreioapi.js
index f428a229..ae249480 100755
--- a/js/io/system/coreioapi.js
+++ b/js/io/system/coreioapi.js
@@ -393,12 +393,12 @@ exports.CoreIoApi = Montage.create(Component, {
393 xhr = new XMLHttpRequest(); 393 xhr = new XMLHttpRequest();
394 // 394 //
395 xhr.open("POST", serviceURL, false); 395 xhr.open("POST", serviceURL, false);
396 xhr.responseType = "arraybuffer"; 396 //xhr.responseType = "arraybuffer";
397 if(file.contentType && file.contentType.length) 397 if(file.contentType && file.contentType.length)
398 xhr.setRequestHeader("Content-Type", file.contentType); 398 xhr.setRequestHeader("Content-Type", file.contentType);
399 else 399 else
400 xhr.setRequestHeader("Content-Type", "text/plain"); 400 xhr.setRequestHeader("Content-Type", "text/plain");
401 401
402 if (file.contents) 402 if (file.contents)
403 xhr.send(file.contents); 403 xhr.send(file.contents);
404 else 404 else
diff --git a/manifest.json b/manifest.json
index 80d8a5be..0500101b 100644
--- a/manifest.json
+++ b/manifest.json
@@ -12,9 +12,7 @@
12 }, 12 },
13 "permissions": [ 13 "permissions": [
14 "unlimitedStorage", 14 "unlimitedStorage",
15 "notifications", 15 "notifications"
16 "webRequest",
17 "webRequestBlocking"
18 ], 16 ],
19 "requirements": { 17 "requirements": {
20 "3D": { 18 "3D": {