diff --git a/index.html b/index.html
index ca0c794..3b0076a 100644
--- a/index.html
+++ b/index.html
@@ -15,29 +15,15 @@
var Url = (function(){
return {
-
initBase: function(){
- var base = window.location.href;
- var host = window.location.host;
- var regex = new RegExp(".*" + host + '/', "g");
-
- if(host){
- base = base.replace(regex,'');
- }else{
- base = base.replace('index.html','');
- }
- return base
- },
- removeUrlParameters: function(full_url){
- var url_base = full_url.split('#').shift();
- return url_base;
+ return "//" + window.location.host + window.location.pathname.replace('/index.html','');
},
- addBaseUrl: function(filename){
+ addBaseUrl: function(filename){
var base = window.location.href;
if(base.match(/file:/) || filename.match(/http:/)){
base = '';
}else{
- base = this.removeUrlParameters(base) + '/';
+ base = this.initBase() + '/';
}
return base + filename;
}
diff --git a/js/requirejs-config.js b/js/requirejs-config.js
index cbe8487..d2bb5f0 100644
--- a/js/requirejs-config.js
+++ b/js/requirejs-config.js
@@ -1,6 +1,5 @@
if(window.Url){
- var base = Url.initBase();
- base = Url.removeUrlParameters(base) + '/js/';
+ var base = Url.initBase() + '/js/';
}else{
base = '../js'
}
--
libgit2 0.21.2