Skip to content

Instantly share code, notes, and snippets.

@z411
Last active March 21, 2020 05:59
Show Gist options
  • Save z411/0aa5dc088ab34572ccbe352651b4a04e to your computer and use it in GitHub Desktop.
Save z411/0aa5dc088ab34572ccbe352651b4a04e to your computer and use it in GitHub Desktop.
DLSite/HVDB interlinking userscripts
// ==UserScript==
// @name DLSite to HVDB
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Add link to HVDB in DLSite product pages
// @author z411
// @match https://www.dlsite.com/maniax/work/=/product_id/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
var url = window.location.href;
var rj = url.match(/RJ(\d+)/)[1];
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>";
})();
// ==UserScript==
// @name HVDB to DLSite
// @namespace http://tampermonkey.net/
// @version 0.1
// @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 rj = "RJ" + window.location.href.split('/').pop();
var h2 = document.getElementsByTagName("h2")[0];
h2.innerHTML += " (<a rel=\"noreferrer\" href=\"https://www.dlsite.com/maniax/work/=/product_id/" + rj + ".html\">DLSite</a>)";
})();
@koma-cute
Copy link

I made some changes to support DLSite EN and HVDB's optional RE/RJ prefix on URLs in my fork.

@z411
Copy link
Author

z411 commented Feb 15, 2020

Looks good, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment