Giter Club home page Giter Club logo

epubviewer's Introduction

  • I am currently studying Software Engineering at Queen's University.
  • I like working on backends embedded systems tool development reverse engineering cybersecurity
  • I know a bit about sysadmin devops networking full-stack web development
  • I have dabbled with electronics 3d-printing pcb design
  • I am experienced with Go JavaScript TypeScript Linux C HTML CSS Bash ARMv7 Android EPUB Docker
  • I am familiar with Windows C++ Java Python SQL PromQL
  • I am learning Rust x64 ARM64 PowerShell Kotlin

Recently, I've been working on

You can find me on

epubviewer's People

Contributors

geek1011 avatar pgaskin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

epubviewer's Issues

Open Book Error

Steps:

  1. Visit to link and look error.
    https://kuranvebilim.github.io/viewer/ePubViewer/#https://kuranvebilim.github.io/assets/Harun_Yahya_Kitaplar/AA/epub/akilsizKuraniNasilYorumlar_11b_tr.epub

  2. as Manual open file at https://kuranvebilim.github.io/viewer/ePubViewer and no problem, normally opens epub file.

  3. Manually it opens normal but if it visits to link what does not open.

Error
error loading book: Error: response status: 404
{"error":"Error: response status: 404 ","stack":"Error: response status: 404 \n at https://kuranvebilim.github.io/viewer/ePubViewer/script.js:678:43"}
akilsizKuraniNasilYorumlar_11b_tr.zip

Expected Result

  1. It visits to link what opens.

Are you going to add bookmark?

Just a question?
Are you going to implement bookmark system coz epub.js bookmark; i think it's broke, like getting the Chapter Name from CFI range.

I post this issue futurepress/epub.js#839

Can you look into that...

BTW awesome work here man. 👍 learn a lot form your code.

Text Highlighting and Notes

Hi, I found this JS app very simple and fastloading, powerful to override on errors but I am wondering if I can add text highlighting and note making scripts. I tried with rangy libraries and text-hightligh.js but it returns error. Can somebody assist me?

Thanks

Deactivate Ctrl+C and print

Hi.
I'm using your software and I'd like to know if it's possible to deactivate the Ctrl+C command and to print the document.

I've been reading the documentation and I haven't found nothing related with this topic.

If this isn't the appropiated place for this question I apologize for that.

Any info will be appreciated.

Thanks in advance.

when I browse it on Chrome

Please try reloading the page or using a different browser (Chrome or Firefox), and if the error still persists, report an issue.
Script error.

Open epub from url

Hello
How open url epub file without download to cash browser?
thank you

How did you achieve toggling between multiple styles?

I am working on a similar project and I don't seem to figure out how to achieve toggling and selecting a combination of styles.
When I choose a specific style it overwrites the previously applied style for eg. Selecting Dark Mode and then selecting a smaller font only makes the font smaller and it overwriting the dark mode.
Here is how I am applying various styles

document.getElementById("darkTheme").addEventListener("click", function(){
    rendition.themes.register("dark", "themes.css");
    rendition.themes.select("dark");
});

Similar to this I have created multiple themes and then I am selecting them at an onclick event listener.
Please help me out with this 🙏 I really need to get this project done
PS : You made a really Great Epub Reader :)

[Feature Request] Distraction Free mode

Currently even in fullscreen the UI elements are visible. It would be better UX to hide the UI elements such as menu button, book name etc after the user's mouse stops moving for a while. And then, Someone can easily use keyboard to navigate in this distraction free reading mode.

Benefits:

  • Better UX

TOC error

I have uploaded an ePub and everything works well except for the TOC. It seems that the ePubViewer is not recognizing hyperlinks. The ePub is validated with epubchecker.

Missing `)` in injected script

Hi Patrick,

First of all, awesome job with ePubViewer!!! Thank you for your hard work and permissive license 🙏

I want to address two quick issues on the repo

quick bug fix

I cloned and ran the repo locally, everything works as expected :) I did notice one small syntax error in the console, which seems to be coming from an injected JS file pulled from your site

The following snippet is missing a )

(window.location.toString().indexOf(atob("XXXXXXXX") > -1) {
    //...
}

XXXXXXXX is an example, of course

I'm not exactly sure how relevant this piece is, as it seems to be checking for a license on an open source solution 🤔 but figured I would bring it up. Sorry I couldn't open a PR with the change, I obviously don't have access to this file

personal forks and changes

I also noticed a log in the injected script

If you are planning to make changes to your own copy of ePubViewer, it would be nice if you could remove the Sentry error reporting (all the Raven stuff). Thanks!

Which did not print to my console when running your repository locally (directly in the browser, not through a web server)

Similar to my previous point, not sure how relevant it is

More importantly: is there any other functionality that you would like developers to remove from their personal forks of ePubViewer?

If so, we could add them to a local development section of the readme. I can make a PR for it if you point me in the right direction!

Thanks again for your hard work and feel free to close the issue if you find these notes not relevant :)

guys, not work. fix the error. thanks.

this is the error: {"error":"TypeError: Unable to get property 'prev' of undefined or null reference","stack":"TypeError: Unable to get property 'prev' of undefined or null reference\n at App.prototype.onKeyUp (ms-appx-web://bluskysoftwareinc.ebooksreaderforkindlebooksmobiep/script.js:424:9)","msg":"Unable to get property 'prev' of undefined or null reference","url":"ms-appx-web://bluskysoftwareinc.ebooksreaderforkindlebooksmobiep/script.js","line":424,"column":9}

Android

Hi
Tried using this in an Android webview and got the following error:
{"error":"TypeError: Cannot read property 'getItem' of null","stack":"TypeError: Cannot read property 'getItem' of null\n at App.restoreChipActive (file:///android_asset/ePubViewer-gh-pages/script.js:146:26)\n at file:///android_asset/ePubViewer-gh-pages/script.js:142:100\n at Array.forEach ()\n at App.loadSettingsFromStorage (file:///android_asset/ePubViewer-gh-pages/script.js:142:74)\n at new App (file:///android_asset/ePubViewer-gh-pages/script.js:90:14)\n at file:///android_asset/ePubViewer-gh-pages/script.js:690:18"}
When I run it in a browser it runs fine.

Error Please try reloading the page or using a different browser (Chrome or Firefox), and if the error still persists, report an issue. Uncaught TypeError: Cannot read properties of undefined (reading 'next')

{"error":"TypeError: Cannot read properties of undefined (reading 'next')","stack":"TypeError: Cannot read properties of undefined (reading 'next')\n at t.value (https://file+.vscode-resource.vscode-webview.net/home/roni/.vscode/extensions/cweijan.epub-reader-1.0.0/resource/epub/epub.js:1:70114)\n at HTMLDocument.App.window.onmousewheel.document.onmousewheel (https://file+.vscode-resource.vscode-webview.net/home/roni/.vscode/extensions/cweijan.epub-reader-1.0.0/resource/epub/script.js:60:34)","msg":"Uncaught TypeError: Cannot read properties of undefined (reading 'next')","url":"https://file+.vscode-resource.vscode-webview.net/home/roni/.vscode/extensions/cweijan.epub-reader-1.0.0/resource/epub/epub.js","line":1,"column":70114}

[Feature Request] Load book from URL

Thank you so much for this amazing free project!

Maybe this is already possible, but I don't know how to do it. Anyway, I would like to load a book from url (some public web address, my dropbox, etc.). I'm not sure how to implement this. Maybe CORS would be a problem? Any hint appreciated.
Edit: sorry for stupid question, it looks really simple...
Edit2: Ups, I just found... "If you are planning to make changes to your own copy of ePubViewer, it would be nice if you could remove the Sentry error reporting (all the Raven stuff). Please also remove Google Analytics. Thanks!"

Thank you for all the nice comments in the code!

Edit 3: I was really stupid about this. Epub.js has integrated reader from URL, so your reader can be used also like this, and it works perfectly!

[Feature Request] Highlighting and annotation

Im pretty sure epub.js already have these in their api but if these were added it would improve user experience because we can save notes and remember certain things kinda like bookmarks

Open epub error

I can not read epub on chromium,but firefox can
chromium version 72.0.3626.121(stable)Manjaro Linux (64 bit)

image
Error message:

Uncaught TypeError: Cannot read property 'pageFromCfi' of undefined

{"error":"TypeError: Cannot read property 'pageFromCfi' of undefined","stack":"TypeError: Cannot read property 'pageFromCfi' of undefined\n at Rendition.located (http://localhost:8090/static/reader/epub/libs/epub.js:7296:39)\n at Rendition.reportedLocationAfterRAF (http://localhost:8090/static/reader/epub/libs/epub.js:7189:26)\n at d (https://cdn.ravenjs.com/3.26.2/raven.min.js:2:4702)","msg":"Uncaught TypeError: Cannot read property 'pageFromCfi' of undefined","url":"https://cdn.ravenjs.com/3.26.2/raven.min.js","line":2,"column":4725}

Section image cannot loaded

The image in Section could not be loaded, I tried to fix it, but I failed.
The same is true in the BookBrowser project, but calibre can load the images in the chapters normally.
I try to know why and how to fit it, but i failed.

Test'Picture OnThis :
ePubViewer can't load::: https://github.com/conan71/pyscript/blob/master/1.jpg
Calibre can load:::: https://github.com/conan71/pyscript/blob/master/2.jpg
Calibre can load2:::: https://github.com/conan71/pyscript/blob/master/3.jpg

I can't load my AZW ebook

hello
I can't load my AZW ebook. When i load it in the app, it starts loading and using like 3gb of RAM.
Thanks in advance

Double clicking issue with page turning and dictionary lookup

In the browser, double clicking moves to the previous or next page if i click at the left or right end of the page. However, it affects dictionary lookup of words at the left or right end of the page. In my opinion page turning on double click should be disabled or optionally disabled. Otherwise dictionary lookup becomes problematic.

Progress bar

Add a location display option with a slider and chapter ticks.

Question about theme.

i saw your answer from epub.js
i modified this https://github.com/geek1011/ePubViewer/blob/5b4d4990350d0548a7634b7a4d95aa0f39e262ab/script.js#L408-L461 to this for my app my question is i have to call this function from every time chapter changes what should i do? do i have to call all the time page changes or i m missing something?

let rules = {
        "body": {
            "background": "#888888",
            "color": "#525252"
        },
        "p": {
            "font-family": "Aerial",
            "font-size": "12px",
        },
        "a": {
            "color": "inherit !important",
            "text-decoration": "none !important",
            "-webkit-text-fill-color": "inherit !important"
        },
        "a:link": {
            "color": "#909090",
            "text-decoration": "none !important",
            "-webkit-text-fill-color": "#909090"
        },
        "a:link:hover": {
            "background": "rgba(0, 0, 0, 0.1) !important"
        },
        "img": {
            "max-width": "100% !important"
        },
    };
	
	if(this.Rendition){
		this.Rendition.getContents().forEach(c => c.addStylesheetRules(rules));
	}

Suggestion: A fork for kanji lookup

There's an API for Japanese words lookup at https://kanjiapi.dev/

Can you make a fork for that? Your epub-viewer is the kickassest, it would mean a world to the students who get their days by by converting japanese pdf books to epub just so they'd be practical to use.

Just try to get all the kana out and request the words written with up to several kanjis to https://kanjiapi.dev/v1/words/.

I'd do that myself. But I don't know javascript and it's too hard for me to get through your code. I'm also an artist, and programming makes my head hurt. I admire the God guy, he's like took these classes together, but where I live it's even hard to find a guy who needs a thing drawn and can pay 50 rubles for it. Talk about all that Nihonnese escapism.

ePubViewer is not defined

Hi, I include all script in my system but dont working.
if I click in Openbook button the console print this msg:

ReferenceError: ePubViewer is not defined
at :1:1
(anonymous) @ VM671:1

and in screen print this msg:

{"error":"ReferenceError: ePubViewer is not defined","stack":"ReferenceError: ePubViewer is not defined\n at :1:1","msg":"Uncaught ReferenceError: ePubViewer is not defined","url":"","line":1,"column":1}

I dont know because I include all files script and css. because I'm include all files script and css.

can you help me?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.