Royal Road Download Button

Adds buttons to download Royal Road chapters

目前為 2024-06-22 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
Rtonne
評價
0 0 0
版本
6.2
建立日期
2023-05-19
更新日期
2024-06-22
尺寸
29.2 KB
授權條款
MIT
腳本執行於

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 filename prefix is used to keep the downloaded files in the correct 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