-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdmm.delivery-list.user.js
42 lines (38 loc) · 1.49 KB
/
dmm.delivery-list.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// ==UserScript==
// @name dmm - delivery-list
// @namespace https://github.com/tomyangsh/userscrips
// @include https://www.dmm.co.jp/digital/videoa/-/delivery-list/*
// @version 1.0
// ==/UserScript==
(function() {
'use strict'
for (i of document.querySelector("#list").children) {
i.style = "width: 147px;";
i.querySelector("div p.tmb a span img").style.maxWidth = "1000px";
i.querySelector("div p.tmb a span img").style.maxHeight = "1000px";
try {
i.querySelector("div p.sample").style.top = "202px";
i.querySelector("div p.sample").style.left = "32%";
} catch {}
let img = i.querySelector("div p.tmb a span img").src.replace("pt.jpg", "ps.jpg");
i.querySelector("div p.tmb a span img").src = img;
let cid = i.querySelector("div p.tmb a").href.match(/[a-z]+\d+/)[0];
let javlib = document.createElement("a");
javlib.style = "font-size: 12px; color: #0b31ff;";
javlib.href = "https://www.javlibrary.com/cn/vl_searchbyid.php?keyword=" + cid;
javlib.target = "_blank";
javlib.innerText = cid;
let javlib_span = document.createElement("span");
javlib_span.append(javlib);
i.querySelector("p.sublink").prepend(javlib_span);
}
var arr = document.querySelector("#list").children;
var len = arr.length;
for (var i = 0; i < len - 1; i++) {
for (var j = 0; j < len - 1 - i; j++) {
if (arr[j].querySelector("p.sublink span a").innerText > arr[j+1].querySelector("p.sublink span a").innerText) {
arr[j].parentNode.insertBefore(arr[j], arr[j+2]);
}
}
}
})()