Greasy Fork is available in English.

Royal Road Download Button

Adds buttons to download Royal Road chapters

Tác giả
Rtonne
Cài đặt hàng ngày
0
Số lần cài đặt
36
Đánh giá
0 0 0
Phiên bản
6.3
Đã tạo
19-05-2023
Đã cập nhật
23-06-2024
Giấy phép
MIT
Áp dụng cho

About

This script adds a "Download Chapters" button next to the already existing buttons (such as "Follow" or "Donate") to all fictions and "Download Chapter" buttons to every chapter on the Royal Road website.

When the button is pressed, the script scrapes the chosen chapters of the fiction into easily readable .html files, and packages them into a .zip file.

The .html files contain styling to emulate Royal Road's default dark mode (with font size 16 due to personal preference), and working previous/next chapter buttons on desktop using the file URI scheme.

There are some options you can change in your userscript manager:

  • If you want to use the chapter's publish date, or the chapter ID in the chapter's URL as the filename prefix.
    • The chapter's publish date is the default and will keep the chapter release order.
    • The chapter ID in the chapter's URL can keep the chapter release order, but if the newer chapters' IDs have more digits than the older, the order will be wrong (for example, while 1000000 is bigger than 300000, the file system will display them in the wrong order).
  • If you want to download the images included in the chapters as well.
    • If an error ocurred while fetching an image and it couldn't be downloaded, you can find the error in the console.
    • If you find this takes too much storage space, you can later delete the images and it will fall back to the online images.

How to access the files on Android

Using the file URI scheme

It mostly works like on desktop, using a file:// link on a browser, but I found that to access those links on Android, they either need to be a bookmark or your homepage.

Additionally, due to Android's increased restrictions, you'll need to use a tool like adb to find the internal storage and SD card locations. In my case, my internal storage was on file:///sdcard/, but my SD card required additional permissions to access which I was unable to grant to my browser.

Using other apps

The apps I recommend are ones like HTTP File Server (+WebDAV) by slowscript, that create a small server in your phone so that you can access your files using any browser.

You might be able to find an app made specifically for viewing HTML files if you look hard enough, but it may not work with the Previous/Next buttons or with downloaded images.

Other info

If you want the file names to use incremental numbers as the prefix, the last version that did this is v4.8.

Tags: Royal Road, RoyalRoad, RR, Web Novel, royalroad.com


Image of the button on a fiction page Image of the button on the top of a chapter page Image of the button on the bottom of a chapter page Image of the options in violentmonkey