Add support to thunderscans#3202
Merged
Merged
Add support to thunderscans#3202
Conversation
lolamtisch
requested changes
Sep 22, 2025
Comment on lines
+102
to
+104
| overviewIsReady($c) { | ||
| return $c.waitUntilTrue($c.querySelector('h1').isNil().not().run()).trigger().run(); | ||
| }, |
| }, | ||
| list: { | ||
| elementsSelector($c) { | ||
| return $c.querySelectorAll('ul > li > a .chbox').run(); |
Member
There was a problem hiding this comment.
This will break with minimal page changes better use something like #chapterlist .chbox
| .run(); | ||
| }, | ||
| getTitle($c) { | ||
| return $c.title().split(' Chapter').at(0).trim().replaceRegex('-$', '').trim().run(); |
Member
There was a problem hiding this comment.
You could just get the title out of the overview link .allc a
| return $c.title().split(' Chapter').at(0).trim().replaceRegex('-$', '').trim().run(); | ||
| }, | ||
| getIdentifier($c) { | ||
| return $c.url().urlPart(3).split('-chapter-').at(0).trim().run(); |
Member
There was a problem hiding this comment.
better use return $c.url().this('sync.getOverviewUrl').this('overview.getIdentifier').run();
This will only work if you get the overviewUrl from .allc a
| }, | ||
| getEpisode($c) { | ||
| return $c | ||
| .coalesce($c.url().urlPart(3).split('-chapter-').at(1).number().run()) |
Member
There was a problem hiding this comment.
coalesce is unnecessary. Just remove it, while keeping the content the same
Comment on lines
+45
to
+56
| readerConfig: [ | ||
| { | ||
| current: { | ||
| selector: '#readerarea img', | ||
| mode: 'countAbove', | ||
| }, | ||
| total: { | ||
| selector: '#readerarea img', | ||
| mode: 'count', | ||
| }, | ||
| }, | ||
| ], |
Member
There was a problem hiding this comment.
readerConfig: [
{
condition: '#select-paged',
current: {
selector: '#select-paged option:selected',
mode: 'text',
regex: '(\\d+)/(\\d+)$',
group: 1,
},
total: {
selector: '#select-paged option:selected',
mode: 'text',
regex: '(\\d+)/(\\d+)$',
group: 2,
},
},
{
current: {
selector: '#readerarea img',
mode: 'countAbove',
},
total: {
selector: '#readerarea img',
mode: 'count',
},
},
],
Comment on lines
+105
to
+107
| syncIsReady($c) { | ||
| return $c.waitUntilTrue($c.querySelector('h1').isNil().not().run()).trigger().run(); | ||
| }, |
Member
There was a problem hiding this comment.
Not sure if this is necessary too
lolamtisch
approved these changes
Sep 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#3198
https://en-thunderscans.com/