-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDLsiteDLFarmAuto.js
65 lines (62 loc) · 1.16 KB
/
DLsiteDLFarmAuto.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// ==UserScript==
// @name DLsite DL Farm Auto
// @namespace http://tampermonkey.net/
// @version 0.1
// @description DLsite DL Farm Auto
// @author Shiiho
// @match https://www.dlsite.com/*
// @icon https://www.dlsite.com/images/web/common/favicon.ico
// @grant none
// ==/UserScript==
(function () {
let url = "/home/event/dlfarm/ajax"
let data = { act: "show" }
//let data = { act: "draw" }
$.getJSON(url, data).then(
function (json) {
console.log(json)
if (json.class[1] == "logged_in") {
data = { act: "draw" }
$.getJSON(url, data).then(
function (result) {
console.log(result)
}
)
}
}
)
})();
/*
{ act: "show" }
{
"class": [
"spring_01",
"logout"
]
}
{
"class": [
"spring_01",
"logged_in"
]
}
{
"class": [
"spring_01",
"end",
"type_02"
]
}
{ act: "draw" }
{
"class": [
"type_02"
],
"name": "タンポポ"
}
{
"class": [
"error"
]
}
*/