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

github.com/wayjam/hugo-theme-mixedpaper.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authorWayJam So <imsuwj@gmail.com>2020-07-22 18:35:26 +0300
committerWayJam So <imsuwj@gmail.com>2020-07-22 18:35:26 +0300
commite18d66917332ea00f920cf17e798ecd1215c4140 (patch)
treefb6702c89ba7d9ea878256fb63cec5850667efc2 /assets
parent02f80e96db0e30b6d62702b1ab41ea257d89e871 (diff)
format code
Diffstat (limited to 'assets')
-rw-r--r--assets/js/main.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/assets/js/main.js b/assets/js/main.js
index 2b467a7..5300c36 100644
--- a/assets/js/main.js
+++ b/assets/js/main.js
@@ -1,11 +1,11 @@
-(function() {
+(function () {
const backToTopBtn = document.getElementById("back_to_top");
- window.onscroll = function() {
+ window.onscroll = function () {
scrollFunction(backToTopBtn);
};
- backToTopBtn.addEventListener("click", backToTop)
+ backToTopBtn.addEventListener("click", backToTop);
})();
function scrollFunction(btn) {
@@ -16,7 +16,7 @@ function scrollFunction(btn) {
// When the user clicks on the button, scroll to the top of the document
function backToTop(e) {
- e.preventDefault()
+ e.preventDefault();
document.body.scrollTop = 0; // For Safari
document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
}