Skip to content

Commit

Permalink
Fix: Some errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ollm authored Jan 24, 2025
1 parent 3265e1f commit 870bc57
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Sometimes right click on reading fails [`b14a26e`](https://github.com/ollm/OpenComic/commit/1a8e145a997c67494e1a6c70c5f73acee7720000)
- Avoid generating thumbnails of images that are still being extracted (Extractions with 7-Zip) [`c415b3f`](https://github.com/ollm/OpenComic/commit/c415b3f0f6eb4bd6eb1bdd6cdd8a191b809df91e)
- Error attempting to open the bookmarks menu after navigating to a bookmark [`80c1b0e`](https://github.com/ollm/OpenComic/commit/80c1b0eb7ea441e1f55a86713d04fe835089ef3d)
- Can't override font in some epub files
- Can't override font in some epub files [`3265e1f`](https://github.com/ollm/OpenComic/commit/3265e1f2079f3b824047e5134e3b08938ae2e832)

## [v1.3.1](https://github.com/ollm/OpenComic/releases/tag/v1.3.1) (05-10-2024)

Expand Down
9 changes: 6 additions & 3 deletions scripts/ebook.js
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,7 @@ var ebook = function(book, config = {}) {
body img {
max-width: calc(100vw - `+(horizontalMargin * 2)+`px) !important;
max-height: calc(100vh - `+(verticalMargin * 2)+`px) !important;
width: initial !important;
}
body p img {
Expand Down Expand Up @@ -882,13 +883,15 @@ var ebook = function(book, config = {}) {

this._generateTocWithPages = function(items, hrefPage) {

let toc = [];
const toc = [];

for(let i = 0, len = items.length; i < len; i++)
{
let item = items[i];
const item = items[i];
const href = item.href || '';
const _href = href.replace(/^\.+[\/\\]/, '');

let page = hrefPage[item.href] !== undefined ? hrefPage[item.href] : false;
const page = hrefPage[href] !== undefined ? hrefPage[href] : (hrefPage[_href] !== undefined ? hrefPage[_href] : false);

this.tocPages.push(page);

Expand Down
2 changes: 1 addition & 1 deletion scripts/recently-opened.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ async function load(animation = true, content = false)
dom.boxes.reset();
dom.fromLibrary(false);
dom.indexPathControl(false, false, false, false, true);
dom.setCurrentPageVars('recently-opened');

template.loadContentRight('index.content.right.loading.html', animation);
template.loadHeader('recently.opened.header.html', animation);
Expand Down Expand Up @@ -113,7 +114,6 @@ async function load(animation = true, content = false)

handlebarsContext.comics = comics.slice(0, config.recentlyOpenedItems);
handlebarsContext.comicsReadingProgress = false;
dom.setCurrentPageVars('recently-opened');

if(Date.now() - now < 300)
template._contentRight().firstElementChild.innerHTML = template.load('index.content.right.'+config.viewRecentlyOpened+'.html');
Expand Down

0 comments on commit 870bc57

Please sign in to comment.