-
-
Save koma-cute/1ae9beb31518c723ffad805a74f23b7d to your computer and use it in GitHub Desktop.
DLSite/HVDB interlinking userscripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name DLSite to HVDB | |
// @namespace http://tampermonkey.net/ | |
// @version 0.2 | |
// @description Add link to HVDB in DLSite product pages | |
// @author z411 | |
// @match https://www.dlsite.com/maniax/work/=/product_id/* | |
// @match https://www.dlsite.com/ecchi-eng/work/=/product_id/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var rj = window.location.href.match(/R[JE](\d{6,})/)[0]; | |
var title = document.getElementById("work_outline"); | |
title.innerHTML += "<tr><th>HVDB</th><td><a href=\"https://hvdb.me/Dashboard/WorkDetails/" + rj + "\">View in HVDB</a></td></tr>"; | |
})(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name HVDB to DLSite | |
// @namespace http://tampermonkey.net/ | |
// @version 0.2 | |
// @description Add DLSite in HVDB work details page | |
// @author z411 | |
// @match https://hvdb.me/Dashboard/WorkDetails/* | |
// @match https://hvdb.me/Dashboard/Details/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var basename = window.location.href.split('/').pop(); | |
// hvdb links can be prefixed with RE/RJ, so just get the numbers | |
var rj = basename.match(/(R[JE])?([0-9]{5,})/)[2]; | |
rj = rj.padStart(6, '0'); | |
var h2 = document.getElementsByTagName("h2")[0]; | |
h2.innerHTML += " (DLSite <a rel=\"noreferrer\" href=\"https://www.dlsite.com/maniax/work/=/product_id/RJ" + rj + ".html\">JP</a>"; | |
h2.innerHTML += "/<a rel=\"noreferrer\" href=\"https://www.dlsite.com/ecchi-eng/work/=/product_id/RE" + rj + ".html\">EN</a>)" | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment