We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e349f4 commit 6600ae6Copy full SHA for 6600ae6
template/js/index.js
@@ -11,7 +11,7 @@
11
this.root_path = (function(){
12
var elm_path = $$('current_path');
13
var url = window.location.origin+window.location.pathname;
14
- return elm_path?url.replace(elm_path.value,''):'';
+ return elm_path?url.replace(elm_path.value,'').replace(/\/$/,''):'';
15
})();
16
17
this.query = ''; //
@@ -29,7 +29,7 @@
29
goToIndex:function(){
30
var elma = document.getElementsByTagName('A');
31
for (var i = 0; i < elma.length; i++) {
32
- if(elma[i].pathname==='/') elma[i].href = this.root_path.replace(/\/$/,'')+'/';
+ if(elma[i].pathname==='/') elma[i].href = this.root_path+'/';
33
}
34
},
35
bindEvent:function(elm,type,handle){
0 commit comments