Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/hossainemruz/toha.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorNoritaka IZUMI <38166104+noritakaIzumi@users.noreply.github.com>2020-11-13 20:51:58 +0300
committerGitHub <noreply@github.com>2020-11-13 20:51:58 +0300
commit6c03dd74af6b620c299f23eb63250ce5130e1a75 (patch)
tree11a704fcc1ddb24bb656d19ea6df0da7d894946b /static
parent38fdbbfbdb049c0d6dbaf0d95555ac02aae986a2 (diff)
Fix smooth scroll (#164)
The function addSmoothScroll causes an error if a target link contains multibyte characters. Decoding `this.hash` can prevent.
Diffstat (limited to 'static')
-rw-r--r--static/assets/js/main.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/static/assets/js/main.js b/static/assets/js/main.js
index c02f237..47c0886 100644
--- a/static/assets/js/main.js
+++ b/static/assets/js/main.js
@@ -37,7 +37,7 @@ var isMobile = false, isTablet = false, isLaptop = false;
location.hostname == this.hostname
) {
// Figure out element to scroll to
- var target = $(this.hash);
+ var target = $(decodeURI(this.hash));
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
// Does a scroll target exist?
if (target.length) {