lnreader icon indicating copy to clipboard operation
lnreader copied to clipboard

Perma-edit EPUB chapters content with customJS.

Open Palloxin opened this issue 1 year ago • 4 comments

Describe your suggested feature

A way to edit the content of downloaded chapter based on customJS upon export. A little checkbox somewhere here: Screenshot_20241011-105549_1

Why

Instead of hoping that the epub readers support epub3, Perma-editing is a sure hit. Even Moonreader(the best on android) doesnt support epub3. It's also good when the epub gets passed around.

Other details

imag

Acknowledgements

  • [X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
  • [X] I have written a short but informative title.
  • [X] If this is an issue with a source, I should be opening an issue in the sources repository.
  • [X] I have updated the app to version 2.0.0.
  • [X] I will fill out all of the requested information in this form.

Palloxin avatar Oct 12 '24 08:10 Palloxin

Permanent editing doesn't seem possible since there's no way to run the JavaScript separately. It can only execute as part of the script tag within the chapter's HTML.

rajarsheechatterjee avatar Oct 12 '24 10:10 rajarsheechatterjee

image

Palloxin avatar Oct 12 '24 10:10 Palloxin

My thoughts were to add a setting where the user can just add a string to a list. Then we just take this list and generate the typical .replace syntax for the normal chapter view and for the epub it could just run a normal replace before saving. This way it would be easier for non programmers to edit the contents of the chapters.

However this obviously doesn't mean it would work for everything that is possible with customJs.

CD-Z avatar Oct 12 '24 16:10 CD-Z

@CD-Z Not everything, but i hope it can accept most kinds of .replace and processing through variables.

Palloxin avatar Oct 18 '24 14:10 Palloxin