lnreader icon indicating copy to clipboard operation
lnreader copied to clipboard

Add “Raw chapter text” toggle option

Open Palloxin opened this issue 2 years ago • 0 comments

Describe your suggested feature

chapter = document.querySelector('chapter');
chapter.innerText = chapter.outerHTML 

This can allow one to see this: Screenshot_20231110-103933 It should be wrapped up in a toggle option.

Why

For test purposes it would be very useful since going to the website with a pc is a pain.

Another example might be this chapter: IMG_20231110_111030

Why is there so much space? using the toggle option would help to indentify the problem and eliminate it with JS very fast: Screenshot_2023-11-10-11-08-55

Other details

Not sure if it should be applied before or after the JS injector of the app

In the past i made an issue asking for raw html feature and i guess this current issue grants what i had in mind without much bother for the devs.

EDIT: Using this code instead would make the raw chapter text more orderly sorted, easy to read and search. Better for everybody.

chapter = document.querySelector('chapter');
chapter.innerHTML = chapter.innerHTML
.replace(/(<\/(p|h[1-5]|br)>)(?!\n|\s*<p>\s*<\/p>|\s*<(br|h[1-5]))/g, '$1\n')

chapter.innerText = chapter.outerHTML

Like here: IMG_20240116_164827

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 1.1.18.
  • [X] I will fill out all of the requested information in this form.

Palloxin avatar Nov 10 '23 10:11 Palloxin