aboutsummaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authorNerdyPepper <[email protected]>2019-08-02 16:36:34 +0100
committerNerdyPepper <[email protected]>2019-08-02 16:36:34 +0100
commit5b68373e9b08b5ab60d59985dff55ab238a635ca (patch)
tree5b45157fe5dbca1c824ff7595268a920711b28ca /script
parent72d2018f04f55cb9b7b86652e3d1738873cf1095 (diff)
fix anchors [episode 2]
Diffstat (limited to 'script')
-rw-r--r--script/gotoId.js6
-rw-r--r--script/showPost.js1
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 @@
1function 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