Add a button which crosslinks two websites via user-defined URLs.
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 oneJable ↔ MissAV: bi-directionally crosslink Jable and MissAV via video code, used for quick accessing one website from the other onee-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, ...)How does button works:
Prior knowledge needed to configure the settings:
A Setting UI Panel is made to manage all settings:
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-directionalA ➔ B: uni-directionally from website A to BB ➔ 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 chooseB ➔ 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 LabelButton Insert Point: where exactly in the host website you want to inject the button, use CSS-Selector to select the container of button3.3. Variable extraction and processing
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
Find & ReplaceQuick Strip OptionsText CasingAdd Prefix & SuffixHow do I find the 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:
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
// @match https://the_new_website.com inside the code to match the new website, OR// @match *://* inside the code to match all websites, ORThis 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.