-
Notifications
You must be signed in to change notification settings - Fork 195
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
Toggle option to disable chapter titles everywhere in the app #660
Comments
Regarding the chapter titles inside the chapter itself I made a working script that can hide it. spoooiler = document.querySelector(".next-button");
if(spoooiler) {spoooiler.innerText = "———Next Chapter———"}
chapter = document.querySelector('#LNReader-chapter');
chapter.innerHTML = chapter.innerHTML
//preparatory
.replace(/ /g, ' ')//
.replace(/<title>[^<]*<\/title>/, '')//epubs
.replace(/^(?:(?=<)[^\?\.,A-Z”“]*?<\/?div\b[^>]*>\s*)+/, '')
.replace(/(?<=<\/?(?:p|h[1-9]|div|span(?!>\s+<i>))>)\s+/g, '')//
.replace(/\s+(?=<\/?(?:p|h[1-9]|div|(?<=<\/)span)>)/g, '')//
.replace(/<p><\/p>(?!$)/g, '')//
.replace(/^[\s\n]*/, '<p></p>')//
//
.replace(/<\/h([1-4])><\/?h\1>/ , ' ')
.replace(/^((?:<p><\/p>|<(?!(?:p|h[1-4])>)[^>]*>)?[^<]*(?:<input[^>]+>)?(?:\s*<[^>]+>\s*<\/[^>]+>)*)/, '$1π√')//keep $1
.replace(/π√<(h[1-4]|p)>(?:<(?:span|strong|b)>)?(([^C]?Chapter\W+)?(\d{1,4}\b)(\W+(?=\w))?(.+?))(<\/\1>)((?=(.*?<p>))\9((?:\3|\4|\5|\6)(?:\4(?<=\3\4))?\5?\6?\.?)<\/p>)?/i, (_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10) => {
if(_8 === undefined)
return `⸙<${_1}><spo>${_2}${_7}⸙`;
else
return `⸙<${_1}><spo>${_2}${_7}${_9}<spo>${_10}⸙`})
.replace(/⸙([^⸙]+)⸙/, (_, a) => `${a.replace(/<(h[1-4]|p)>([^]+?)<\/\1>/, '<h1>$2</h1>')}`)
.replace(/π√(<(p|h[1-5])>)([^]+?)(?=<\/\2>)/, (_, a,b,c)=> {
const bas = c.replace(/(?:<\/?[a-z]+>|\.$)/g, '')
let dare = reader.chapter.name.includes(bas);
if(dare) return `${a}<spo>${reader.chapter.name}</spo>`;
else return `${_}`})
.replace(/π√/, '')
; This could be a sub-option (checkbox) that the user can choose to activate. Of course it is not perfect but doesn't target wrong text; at most it will not censor the chapter title. |
A dedicated segment in the settings (maybe Reader) to manage these options would be cool. |
Describe your suggested feature
A toggle option in the settings to hide chapter titles in the app.
Here
;
Here:
Here:
Here:
Download Queue:
Here:
Here:
[Facultative] I suggest to add in this last image to add a check box to show chapter titles there just in case users want to take a quick peek at titles without unhiding every single titles in the app so this should apply only on this section like this:
and on the download progress notification:
Why
Titles are spoiler; some like them there, but not everybody for sure.
If one accidentally reads the title of the 400th unread chapter (or more) ahead the current progress (while scrolling the chapter list or download list) by mistake there is the chance that title is a really hard spoiler that can ruin the reading experience like "Bob's death" or "Bob's marriage" etc..
Titles are a kind of summary of the chapter and can really ruin the surprise factor, aka spoilers.
Other details
I noticed that some sources (like FastNovel) don't even have chapters numbered in the chapter list with just the titles so i assume the app itself doesn't number them in the chapter list but it is done by the source. So maybe it would be better if the numbering of chapters is managed by the app.
Acknowledgements
The text was updated successfully, but these errors were encountered: