HVDB-DLSITE-LINK

Add a DLsite link to HVDB works.

当前为 2019-04-08 提交的版本,查看 最新版本

// ==UserScript==
// @name         HVDB-DLSITE-LINK
// @author       Paw
// @icon         http://hvdb.me/favicon.ico
// @namespace    http://tampermonkey.net/
// @version      1.2
// @description  Add a DLsite link to HVDB works.
// @author       You
// @match        http://hvdb.me/Dashboard/WorkDetails/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    var p = document.createElement("p");
    var a = document.createElement("a");
    p.appendChild(a);
    var t = document.querySelector("div.body-content h2").innerHTML;
    var w = t.replace('Work Details - ', '').trim().replace('★', '').trim();
    a.href = "https://dereferer.me/?https://www.dlsite.com/maniax/work/=/product_id/" + w;
    a.target = "_blank";
    var img = document.createElement("img");
    img.src = "https://www.dlsite.com/img/dlsite1.gif";
    a.appendChild(img);
    var x = document.querySelector(".infoLabel label.infoLabel");
    x.parentNode.insertBefore(p, x.nextSibling);
})();