hoothin / UserScripts

Greasemonkey scripts ( Pagetual / Picviewer CE+ / DownloadAllContent ) 油猴脚本集 ユーザースクリプト集
https://greasyfork.org/users/8227-hoothin
2.86k stars 502 forks source link

NexusMods - for when there's no Next button #563

Open Auditormadness9 opened 3 months ago

Auditormadness9 commented 3 months ago

The url of site https://www.nexusmods.com/fallout4/mods/?BH=3

Is your request related to a problem? Please describe. We already have a rule that works when there's a next button, but it doesn't work when there isn't one displayed but there are still multiple pages of results.

Describe the result you'd like with the rule Pagerize the remaining pages even though there is no next button.

Custom rule you've tried Only the one that works with Next.

Additional context image

hoothin commented 3 months ago

Assign the value of //li[a[contains(@class,"page-selected")]]/following-sibling::li[1]/a to the nextLink.

AuditorM9 commented 3 months ago

Assign the value of //li[a[contains(@class,"page-selected")]]/following-sibling::li[1]/a to the nextLink.

didn't work but li:has(a.page-selected) + li > a did, thanks!

hoothin commented 3 months ago

It's nothing. In JSON, double quotes must be escaped. For xpath, You can use "nextLink": "//li[a[contains(@class,\"page-selected\")]]/following-sibling::li[1]/a".