aboutsummaryrefslogtreecommitdiff
path: root/js/mediators/io-mediator.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/mediators/io-mediator.js')
-rw-r--r--js/mediators/io-mediator.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/js/mediators/io-mediator.js b/js/mediators/io-mediator.js
index 23668e13..f44c182c 100644
--- a/js/mediators/io-mediator.js
+++ b/js/mediators/io-mediator.js
@@ -153,7 +153,7 @@ exports.IoMediator = Montage.create(Component, {
153 switch (file.mode) { 153 switch (file.mode) {
154 case 'html': 154 case 'html':
155 //Copy webGL library if needed 155 //Copy webGL library if needed
156 if (file.webgl.length > 0) { 156 if (file.webgl && file.webgl.length > 0) {
157 for (var i in this.application.ninja.coreIoApi.ninjaLibrary.libs) { 157 for (var i in this.application.ninja.coreIoApi.ninjaLibrary.libs) {
158 //Checking for RDGE library to be available 158 //Checking for RDGE library to be available
159 if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'RDGE') { 159 if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'RDGE') {
@@ -335,7 +335,11 @@ exports.IoMediator = Montage.create(Component, {
335 cleanedCss = dirtyCss.replace(/(\b(?:(?:https?|ftp|file|[A-Za-z]+):\/\/|www\.|ftp\.)(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$]))/gi, parseNinjaUrl.bind(this)); 335 cleanedCss = dirtyCss.replace(/(\b(?:(?:https?|ftp|file|[A-Za-z]+):\/\/|www\.|ftp\.)(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$]))/gi, parseNinjaUrl.bind(this));
336 336
337 function parseNinjaUrl (url) { 337 function parseNinjaUrl (url) {
338 return this.getUrlfromNinjaUrl(url, fileRootUrl, fileUrl); 338 if (url.indexOf(this.application.ninja.coreIoApi.rootUrl) !== -1) {
339 return this.getUrlfromNinjaUrl(url, fileRootUrl, fileUrl);
340 } else {
341 return url;
342 }
339 } 343 }
340 344
341 /////////////////////////////////////////////////////////////////////////////////////////// 345 ///////////////////////////////////////////////////////////////////////////////////////////
@@ -353,7 +357,7 @@ exports.IoMediator = Montage.create(Component, {
353 } 357 }
354 } 358 }
355 //Checking for webGL elements in document 359 //Checking for webGL elements in document
356 if (template.webgl.length) { 360 if (template.webgl && template.webgl.length) {
357 // 361 //
358 var json, matchingtags = [], webgltag, scripts = template.document.content.document.getElementsByTagName('script'); 362 var json, matchingtags = [], webgltag, scripts = template.document.content.document.getElementsByTagName('script');
359 // 363 //