diff options
author | Roman Gräf <roman.graef@gmail.com> | 2017-11-06 11:09:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-06 11:09:29 +0100 |
commit | c5b1d6d530f50a2b86b39f18dd22d248f1dae9a7 (patch) | |
tree | 2056277d58a0c7fb12f7043e7c8c4b1f0b7f6e6b /res/default.js | |
parent | 4c9197c7f5104d31cd9870f78057925dc2c6ae71 (diff) | |
download | ichtml-c5b1d6d530f50a2b86b39f18dd22d248f1dae9a7.tar.gz ichtml-c5b1d6d530f50a2b86b39f18dd22d248f1dae9a7.tar.bz2 ichtml-c5b1d6d530f50a2b86b39f18dd22d248f1dae9a7.zip |
Update default.js
Diffstat (limited to 'res/default.js')
-rw-r--r-- | res/default.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/res/default.js b/res/default.js index b5fd7cb..bdb87e4 100644 --- a/res/default.js +++ b/res/default.js @@ -36,7 +36,8 @@ function onload() { var url = item.url;
var name = item.name;
var img = item.img;
- refs[item.id] = {
+ var id = item.id;
+ refs[id] = {
name: name,
url: url
}
@@ -47,7 +48,7 @@ function onload() { atag.onclick = sidebar_close;
}
if(load=="content"){
- atag.href = "#";
+ atag.href = "#"+item.id;
atag.onclick = function(){
sidebar_close();
window.load_(item.url, item.name);
@@ -66,4 +67,8 @@ function onload() { });
el.lastChild.classList.add('sidebar-last');
});
+ let tag = location.href.split("#");
+ if(tag.length > 1){
+ load(tag[1]);
+ }
}
|