1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-10-27 13:28:04 +00:00

Disable bookmarking when anonymous users are reading

This commit is contained in:
Jonathan Rehm
2017-09-30 10:51:20 -07:00
parent 0512e5a940
commit 56c71dd4bf
3 changed files with 12 additions and 4 deletions

View File

@@ -10,8 +10,13 @@
restore: true,
bookmarks: calibre.bookmark ? [calibre.bookmark] : []
});
reader.on("reader:bookmarked", updateBookmark.bind(reader, "add"));
reader.on("reader:unbookmarked", updateBookmark.bind(reader, "remove"));
if (calibre.useBookmarks) {
reader.on("reader:bookmarked", updateBookmark.bind(reader, "add"));
reader.on("reader:unbookmarked", updateBookmark.bind(reader, "remove"));
} else {
$("#bookmark, #show-Bookmarks").remove();
}
/**
* @param {string} action - Add or remove bookmark