diff options
author | notcarbide <41094677+notcarbide@users.noreply.github.com> | 2020-10-09 07:01:39 +0300 |
---|---|---|
committer | notcarbide <41094677+notcarbide@users.noreply.github.com> | 2020-10-09 07:42:34 +0300 |
commit | f9d2b5b481e8a287d7d5be9ecb9f7c787e00e6f8 (patch) | |
tree | 27d0e36a93ed01586b81bb370defc89f977156e5 | |
parent | 0555bddd43c30c19a01e333dd8c7bc08fb80572e (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.js | 6 |
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);
});
|