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

github.com/your-identity/hugo-theme-dimension.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornotcarbide <41094677+notcarbide@users.noreply.github.com>2020-10-09 07:01:39 +0300
committernotcarbide <41094677+notcarbide@users.noreply.github.com>2020-10-09 07:42:34 +0300
commitf9d2b5b481e8a287d7d5be9ecb9f7c787e00e6f8 (patch)
tree27d0e36a93ed01586b81bb370defc89f977156e5
parent0555bddd43c30c19a01e333dd8c7bc08fb80572e (diff)
static: js: main: Fix 'back' behavior for articles
someone browsing a lot of pages trying to go back has a lot to go thru.
-rw-r--r--static/assets/js/main.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/static/assets/js/main.js b/static/assets/js/main.js
index f5fcd8c..8cd9fa7 100644
--- a/static/assets/js/main.js
+++ b/static/assets/js/main.js
@@ -295,7 +295,7 @@
$('<div class="close">Close</div>')
.appendTo($this)
.on('click', function() {
- location.hash = '';
+ history.go(-1);
});
// Prevent clicks from inside article from bubbling.
@@ -308,9 +308,9 @@
// Events.
$body.on('click', function(event) {
- // Article visible? Hide.
+ // Outside click. Article visible. Go Back.
if ($body.hasClass('is-article-visible'))
- $main._hide(true);
+ history.go(-1);
});