Skip to content

Commit 5b1ab9c

Browse files
committed
keep bookTitle and bookId the same between downloaded and cloud books
1 parent e279c29 commit 5b1ab9c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/js/EpubReader.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2674,8 +2674,8 @@ define([
26742674

26752675
PeBL.emitEvent(PeBL.events.newBook, {
26762676
book: window.location.origin + '/?epub=' + encodeURIComponent(ebookURL_filepath),
2677-
bookTitle: ebookURL_filepath.replace('epub_content/bookshelf/', ''),
2678-
bookId: ebookURL_filepath.replace('epub_content/bookshelf/', '')
2677+
bookTitle: ebookURL_filepath.split('epub_content/bookshelf/').pop(),
2678+
bookId: ebookURL_filepath.split('epub_content/bookshelf/').pop()
26792679
});
26802680

26812681
Analytics.trackView('/reader');

0 commit comments

Comments
 (0)