☰

Dual-Websites Crosslinker

Add a button which crosslinks two websites via user-defined URLs.

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 or Violentmonkey 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!)

Author
php w
Daily installs
1
Total installs
50
Ratings
1 0 0
Version
8.6.21
Created
2026-06-03
Updated
2026-09-26
Size
108 KB
License
MIT
Applies to

📖 Overview

Add a button which crosslinks two websites bi-directionally or uni-directionally via user-defined URLs.

Default buttons:

  • nhentai ↔ e-hentai: bi-directionally crosslink nhentai and e-hentai via gallery title, used for quick accessing one website from the other one
  • Jable ↔ MissAV: bi-directionally crosslink Jable and MissAV via video code, used for quick accessing one website from the other one
  • e-hentai - Find Alt: uni-directionally direct user from gallery page to search page via cleaned gallery title, used for quick searching alternative galleries (e.g., other translations, other chapters, ...)
  • nhentai - Find Alt: uni-directionally direct user from gallery page to search page via cleaned gallery title, used for quick searching alternative galleries (e.g., other translations, other chapters, ...)

✨ Key Features

  • Add button(s) to crosslink to other website(s)
    • allow injecting multiple buttons, each button is defined separately
  • Highly customizable
    • Customizable button style: label, injection
    • Customizable source/destination websites URL: allow custom text processing for generating the URL
    • Customizable crosslink direction: bi-directional, uni-directional
  • Works for SPA website
    • Can handle the SPA design of nhentai

🛠️ How it works

How does button works:

  1. User defines (1) the button crosslink direction, (2) host website (where it from), (3) destination website (where it goes), (4) rules to extract and process some wanted text(s) from the host website
  2. Script uses the defined CSS selector to find and extract the wanted text(s) from the host website
  3. Script uses the defined rules to clean and process the extracted text(s) (i.e., variable)
  4. Script inserts the variable(s) to the placeholders in the defined destination website
  5. User clicks button, then redirected to the final destination website URL

⚙️ Settings

Prior knowledge needed to configure the settings:

  • Regex

    For more about Regex, please see FAQ

  • CSS-selector

    For more about CSS selector, please see FAQ

A Setting UI Panel is made to manage all settings:

  • 1. Profile selector
    • Select/create/delete a button. All settings shown below will be the setting of the button selected here.
    • Activation State: activate/deactivate the selected button.
    • Export/Import all button settings (json).
  • 2. Crosslink Direction

    • A ⇆ B: bi-directional
    • A ➔ B: uni-directionally from website A to B
    • B ➔ A: uni-directionally from website B to A

      For uni-directional usage, user can simply choose A ➔ B, and only configure Setting of Website A in session 3.
      OR, can choose B ➔ A, and only configure Setting of Website B.

  • 3. Setting of Website A & B

    • 3.1. Site URL

      • Host Website URL: where you want to put the button at. Support using plain text or Regex to represent the URL

        when setting up new, non-default host website, please change the code metadata to ensure the script runs in the website.
        For more about how to make the script run in new website, please see FAQ

      • Destination Website URL: where you want the button bring you to. Allow using variables defined in session 3.3 to build this URL. Only support using plain text (because the button is supposed to bring you to only one specific URL).

    • 3.2. Button Setting

      • Button Label
      • Button Insert Point: where exactly in the host website you want to inject the button, use CSS-Selector to select the container of button
    • 3.3. Variable extraction and processing

      • Variable Selector:
        • Select/create/delete a variable. All settings shown below will be the setting of the variable selected here.
        • Source of Variable: where exactly in the host website can you find the wanted text, use CSS-Selector to select the HTML element, followed by @Attribute to specify the attribute which contains the wanted text (e.g., #gallery@title). Ignore the @Attribute if the wanted text is in innerText (e.g., #gallery).
        • Extraction Mode: how to extract the wanted text from the Source of Variable
          • Full text
          • Regex: use Regex pattern to capture text segment(s) from the Source of Variable. Then extract a certain segment or concatenate multiple segment(s).
          • Split: usespecified delimiter to split the Source of Variable . Then extract a certain segment or concatenate multiple segment(s).
        • More Text Cleaners & Modifiers:
          • Find & Replace
          • Quick Strip Options
          • Text Casing
          • Add Prefix & Suffix

❓ FAQ

How do I 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 use Regex?

A Regex pattern is an expression to match and/or extract some segment(s) inside a text. To use Regex, user can:

  1. Learn it from elsewhere
  2. Prompt AI to generate a Regex pattern for you directly. Example:
    • You want to use Regex pattern to extract the gallery title "闇憑村 第二夜" from the full title "[あるぷ] 闇憑村 第二夜 (COMIC アンスリウム 2019年7月号) [英訳] [DL版]"
    • You can ask AI with the following prompt:
      Generate a Regex pattern which extracts the text that is not enclosed in any parenthesis or brackets. For example, extract "闇憑村 第二夜" from "[あるぷ] 闇憑村 第二夜 (COMIC アンスリウム 2019年7月号) [英訳] [DL版]".

How to make the script run in new website?

Official documentation: Documentation | Tampermonkey

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

🙏 Acknowledgments

  • AI assistance: this script was developed with the assistance of Gemini.
  • Inspiration: NH ↔ EH Crosslinker.

⚖️ 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.