Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Electron version of foliate-js #42

Open
rango886 opened this issue Nov 29, 2024 · 6 comments
Open

Electron version of foliate-js #42

rango886 opened this issue Nov 29, 2024 · 6 comments

Comments

@rango886
Copy link

I've developed an Electron version of Foliate!!!
https://github.com/rango886/foliate-electron/releases/tag/push
It is developed based on foliate-js https://github.com/johnfactotum/foliate-js

I add some convenient features for it

  • Press the p key to switch the page turning mode(pageup pagedown)
  • Press the s key to switch the scrolling mode
  • Move the mouse to the left to automatically pop up the toc
  • Move the mouse to the bottom and automatically pop up the progress bar
  • Remember the size and position of the last window opened

NVIDIA_Share_hQANhrd8Fg
vMIpFdZlE7
PrqPj7MRpL
YkSRZHVUoa

@johnfactotum
Copy link
Owner

Looks nice. Thanks for sharing!

@Department-stack
Copy link

This is great

@laowus
Copy link

laowus commented Dec 18, 2024

哥们, 我用vite+ vue + electron 弄了个, 但是导入epubjs 会报错, 后来发现electron 可能会调用edge浏览器, 但是这个浏览器没有Object.groupBy这个方法,导致epub.js一些代码报错。我用chrome直接打开没有问题。
edge浏览器报错

@chrox
Copy link
Contributor

chrox commented Dec 18, 2024

哥们, 我用vite+ vue + electron 弄了个, 但是导入epubjs 会报错, 后来发现electron 可能会调用edge浏览器, 但是这个浏览器没有Object.groupBy这个方法,导致epub.js一些代码报错。我用chrome直接打开没有问题。

You need to polyfill the Object.groupBy and some other functions in order to run foliate-js in other older browsers. See https://github.com/chrox/readest/blob/main/apps/readest-app/src/libs/document.ts#L4-L32 and #43

@laowus
Copy link

laowus commented Dec 18, 2024

哥们, 我用vite+ vue + electron 弄了个, 但是导入epubjs 会报错, 后来发现electron 可能会调用edge浏览器, 但是这个浏览器没有Object.groupBy这个方法,导致epub.js一些代码报错。我用chrome直接打开没有问题。

You need to polyfill the Object.groupBy and some other functions in order to run foliate-js in other older browsers. See https://github.com/chrox/readest/blob/main/apps/readest-app/src/libs/document.ts#L4-L32 and #43

Thank you, I upgraded the electron version to "electron": "^33.2.1",, which solved this problem

@laowus
Copy link

laowus commented Dec 18, 2024

哥们, 我用vite+ vue + electron 弄了个, 但是导入epubjs 会报错, 后来发现electron 可能会调用edge浏览器, 但是这个浏览器没有Object.groupBy这个方法,导致epub.js一些代码报错。我用chrome直接打开没有问题。

You need to polyfill the Object.groupBy and some other functions in order to run foliate-js in other older browsers. See https://github.com/chrox/readest/blob/main/apps/readest-app/src/libs/document.ts#L4-L32 and #43

Well done, my old buddy. It's perfect , I have added your code to support older browsers, and more importantly, it can support Win7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants