Gallery Long-Strip Reader

Enable long-strip reader mode for any user-defined gallery website (with image source URL is predictable).

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

ئاپتورى
php w
بۈگۈن قاچىلانغىنى
1
جەمئىي قاچىلانغىنى
9
باھا نومۇرى
0 0 0
نەشرى
8.7.4
قۇرۇلغان ۋاقتى
2026-05-30
يېڭىلانغان ۋاقتى
2026-05-30
Size
50.9 KB
ئىجازەتنامىسى
MIT
قوللايدىغىنى

📖 Overview

Enable long-strip reader mode for any user-defined gallery website (with image source URL is predictable).

  • Default supported website: nhentai, imhentai
  • Not supported website (image source URL is not predictable): e-hentai, hitomi

✨ Key Features

  • Customizable supporting websites

  • Smart image fetching straitegy to save your bandwidth

    • how it works?
      1. User defined the image source URL template
      2. Script extracts the necessary informations (initial placeholders) from the first page (CDN, Gallery ID, Image extension) using the image source URL template.
      3. User defined the spare placeholders and their priorities
      4. Script try fetching the subsequent images with the initial placeholders. If the fetch is failed, spare placeholders will be used according to the provided priority.
      5. Script automatically update the priorities of all placeholders when the most prioritized placeholder failed for a couple of times, aiming to reduce the bandwidth wasted in failed fetching attempts.
  • Suitable for SPA website (e.g., nhentai)

  • Adapted to both Desktop/Mobile


⚙️ Settings

A Setting UI Panel is made to manage all settings:

  • Active Profile (Website): the currently shown configurations, user can add new website here

    • Image Fetching Configuration

      1. Site urls

        • Gallery Reader Page URL (Regex): Regex matching the URL in which the userscript is triggered

          For more about how to add new supporting website, please see FAQ

        • Image source URL Template: URL template of image source url, some placeholders are expected in the template

          For more about Image Source URL, please see FAQ

      2. Initial placeholders

        • First Page Image Source URL (CSS-Selector@Attr): The HTML element (with attribute specified) which points to the Image Source URL of the first page

          For more about CSS-Selector, please see FAQ

      3. Fallback Placeholders

        • CDN nodes (Comma separated): All possible CDN nodes used in the website.

          For more about CDN, please see FAQ

        • Extensions (Comma separated): All possible iamge extension used in the website.

      4. Page elements

        • Total Page Counts (CSS-Selector@Attr): The HTML element (with attribute specified) which points to the total page number of the gallery
        • Container for All Images(CSS-Selector): The HTML element which contain all images
      5. (Advanced) Network request setting: some extra options for the image fetching performance

    • Reader Configuration

      • UI setting
        • Image Fit Mode
        • Preload Page Count
        • Gap Size (px)
        • HTML Elements to Remove (CSS-Selector, Comma separated): used to remove annoying elements.
        • Show current page number: display a floating page number indicator at the bottom center of the screen

❓ FAQ

How to find the CSS selector?

  1. Locate the target element on the page.
  2. Right-click > Inspect.
  3. In the DevTools window, right-click the highlighted element.
  4. Select Copy > Copy CSS selector.

How to find the Image Source URL?

  1. Open any page in the gallery
  2. Right-click on the image (not the thumbnail) > Inspect > In the DevTools window, the element should be highlighted.
  3. Find the URL (with image extension) in the element, usually marked as src="..."

How to find the CDN that the website used?

  1. Open images and inspect their image source urls
  2. Locate where the part of CDN is in the image source url, usually shared by multiple images
  3. Gather all (or almost all) CDNs used by the website

How to add new supporting website?

  1. Ensure that the website is suitable for this script:

    • image source url is predictable, not hashed.
  2. Make the script detects the website:

    • Add the new website URL as // @match https://example.com inside the code, OR
    • Add // @match *://* inside the code to match all websites, OR
    • Directly change script setting in Script Editor (TamperMonkey) > Setting tab > Include/Exclude
  3. Configure the webbsite profile setting:

    • Go to the new website > Open Setting Panel via TamperMonkey > Active Profile (Website) > Add New Profile...
    • Edit the profile settings > Save & Reload

🙏 Acknowledgments

  • AI assistance: this script was developed with the assistance of Gemini.

⚖️ Disclaimer

This script was developed with AI assistance. While tested, unforeseen issues or bugs may exist. Users assume all risks associated with using this script. The author is not responsible for any direct or indirect losses resulting from its use. Please comply with local laws and regulations.