summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-07-02 15:32:55 +0300
committerAndrew Dolgov <[email protected]>2018-07-02 15:32:55 +0300
commit6a244552a58beafe64ab12142d5b98bec0c97c1b (patch)
tree1f216bda0270b97a9ad088728b9b9ec08331ec13 /js
parent62346ca9259cd2571b9dd4746341107d6409b35d (diff)
add toolbar button to jump back if following relative URL
Diffstat (limited to 'js')
-rw-r--r--js/read.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/js/read.js b/js/read.js
index 6d81cb5..779a112 100644
--- a/js/read.js
+++ b/js/read.js
@@ -314,4 +314,12 @@ function dict_lookup(word, callback) {
});
}
+function open_previous_location(elem) {
+ var cfi = $(elem).attr("data-location-cfi");
+ if (cfi) {
+ window.book.rendition.display(cfi);
+ }
+
+ $(elem).fadeOut();
+}