diff options
Diffstat (limited to 'script')
-rw-r--r-- | script/gotoId.js | 6 | ||||
-rw-r--r-- | script/showPost.js | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/script/gotoId.js b/script/gotoId.js new file mode 100644 index 0000000..991bf1d --- /dev/null +++ b/script/gotoId.js | |||
@@ -0,0 +1,6 @@ | |||
1 | function gotoId() { | ||
2 | if ( window.location.hash ) { | ||
3 | let hash = window.location.hash.substring(1); | ||
4 | showPost(hash); | ||
5 | } | ||
6 | } | ||
diff --git a/script/showPost.js b/script/showPost.js index 07a9719..75ffa1c 100644 --- a/script/showPost.js +++ b/script/showPost.js | |||
@@ -6,4 +6,3 @@ function showPost(id) { | |||
6 | post.style.display = "none"; | 6 | post.style.display = "none"; |
7 | } | 7 | } |
8 | } | 8 | } |
9 | |||