pervert-monkey 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/userscripts/3hentai.user.js +34 -0
- package/dist/userscripts/camgirlfinder.user.js +66 -0
- package/dist/userscripts/camwhores.user.js +375 -0
- package/dist/userscripts/e-hentai.user.js +70 -0
- package/dist/userscripts/ebalka.user.js +63 -0
- package/dist/userscripts/eporner.user.js +103 -0
- package/dist/userscripts/erome.user.js +105 -0
- package/dist/userscripts/eroprofile.user.js +52 -0
- package/dist/userscripts/javhdporn.user.js +36 -0
- package/dist/userscripts/missav.user.js +40 -0
- package/dist/userscripts/motherless.user.js +178 -0
- package/dist/userscripts/namethatporn.user.js +77 -0
- package/dist/userscripts/nhentai.user.js +120 -0
- package/dist/userscripts/pornhub.user.js +57 -0
- package/dist/userscripts/spankbang.user.js +71 -0
- package/dist/userscripts/thisvid.user.js +1411 -0
- package/dist/userscripts/xhamster.user.js +161 -0
- package/dist/userscripts/xvideos.user.js +87 -0
- package/package.json +1 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// ==UserScript==
|
|
2
|
+
// @name 3Hentai PervertMonkey
|
|
3
|
+
// @namespace pervertmonkey
|
|
4
|
+
// @version 1.0.0
|
|
5
|
+
// @author violent-orangutan
|
|
6
|
+
// @description Infinite scroll [optional], Filter by Title
|
|
7
|
+
// @license MIT
|
|
8
|
+
// @icon https://www.google.com/s2/favicons?sz=64&domain=3hentai.net
|
|
9
|
+
// @homepage https://github.com/smartacephale/sleazy-fork
|
|
10
|
+
// @homepageURL https://github.com/smartacephale/sleazy-fork
|
|
11
|
+
// @source github:smartacephale/sleazy-fork
|
|
12
|
+
// @supportURL https://github.com/smartacephale/sleazy-fork/issues
|
|
13
|
+
// @match https://*.3hentai.net/*
|
|
14
|
+
// @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.8/dist/core/pervertmonkey.core.umd.js
|
|
15
|
+
// @require data:application/javascript,var core = window.pervertmonkey.core || pervertmonkey.core; var utils = core;
|
|
16
|
+
// @grant GM_addStyle
|
|
17
|
+
// @grant unsafeWindow
|
|
18
|
+
// @run-at document-idle
|
|
19
|
+
// ==/UserScript==
|
|
20
|
+
|
|
21
|
+
(function (core) {
|
|
22
|
+
'use strict';
|
|
23
|
+
|
|
24
|
+
new core.RulesGlobal({
|
|
25
|
+
containerSelectorLast: ".listing-container",
|
|
26
|
+
thumbsSelector: ".doujin-col",
|
|
27
|
+
titleSelector: ".title",
|
|
28
|
+
getThumbImgDataStrategy: "auto",
|
|
29
|
+
gropeStrategy: "all-in-all",
|
|
30
|
+
customDataSelectorFns: ["filterInclude", "filterExclude"],
|
|
31
|
+
schemeOptions: ["Text Filter", "Badge", "Advanced"]
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
})(core);
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// ==UserScript==
|
|
2
|
+
// @name CamGirlFinder PervertMonkey
|
|
3
|
+
// @namespace pervertmonkey
|
|
4
|
+
// @version 1.6.0
|
|
5
|
+
// @author violent-orangutan
|
|
6
|
+
// @description Adds model links for CamWhores, webcamrecordings, recu.me, camvideos, privat-zapisi
|
|
7
|
+
// @license MIT
|
|
8
|
+
// @icon https://www.google.com/s2/favicons?sz=64&domain=camgirlfinder.net
|
|
9
|
+
// @homepage https://github.com/smartacephale/sleazy-fork
|
|
10
|
+
// @homepageURL https://github.com/smartacephale/sleazy-fork
|
|
11
|
+
// @source github:smartacephale/sleazy-fork
|
|
12
|
+
// @supportURL https://github.com/smartacephale/sleazy-fork/issues
|
|
13
|
+
// @match https://camgirlfinder.net/*
|
|
14
|
+
// @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.8/dist/core/pervertmonkey.core.umd.js
|
|
15
|
+
// @require data:application/javascript,var core = window.pervertmonkey.core || pervertmonkey.core; var utils = core;
|
|
16
|
+
// @grant none
|
|
17
|
+
// @run-at document-idle
|
|
18
|
+
// ==/UserScript==
|
|
19
|
+
|
|
20
|
+
(function () {
|
|
21
|
+
'use strict';
|
|
22
|
+
|
|
23
|
+
const websites = [
|
|
24
|
+
{ name: "camwhores.tv", url: (u) => `https://camwhores.tv/search/${u}/` },
|
|
25
|
+
{
|
|
26
|
+
name: "webcamrecordings.com",
|
|
27
|
+
url: (u) => `https://www.webcamrecordings.com/modelSearch/${u}/page/1/`
|
|
28
|
+
},
|
|
29
|
+
{ name: "camvideos.me", url: (u) => `https://camvideos.me/search/${u}` },
|
|
30
|
+
{ name: "recu.me", url: (u) => `https://recu.me/performer/${u}` },
|
|
31
|
+
{
|
|
32
|
+
name: "privat-zapisi.info",
|
|
33
|
+
url: (u) => `https://www.privat-zapisi.info/search/${u}/`
|
|
34
|
+
}
|
|
35
|
+
];
|
|
36
|
+
function createLinks(name) {
|
|
37
|
+
return websites.map(
|
|
38
|
+
(w) => `
|
|
39
|
+
<a rel="nofollow" href="${w.url(name)}">
|
|
40
|
+
<img class="platform-icon" title="${w.name}" src="https://www.google.com/s2/favicons?sz=64&domain=${w.name}"></a>`
|
|
41
|
+
).join(" ");
|
|
42
|
+
}
|
|
43
|
+
function addRedirectButton() {
|
|
44
|
+
if (!document.body.querySelector(".model-name")?.innerText.trim()) return;
|
|
45
|
+
document.querySelectorAll(".result:not(.fucked)").forEach((e) => {
|
|
46
|
+
const name = e.querySelector(".model-name")?.innerText.trim();
|
|
47
|
+
if (name?.length === 0) return;
|
|
48
|
+
e.querySelector("p:last-child").innerHTML += createLinks(name);
|
|
49
|
+
e.classList.add("fucked");
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
let timeout;
|
|
53
|
+
const observer = new MutationObserver((mutations) => {
|
|
54
|
+
mutations.forEach(() => {
|
|
55
|
+
clearTimeout(timeout);
|
|
56
|
+
timeout = setTimeout(addRedirectButton, 300);
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
observer.observe(document.body, {
|
|
60
|
+
attributes: true,
|
|
61
|
+
childList: true,
|
|
62
|
+
subtree: true
|
|
63
|
+
});
|
|
64
|
+
addRedirectButton();
|
|
65
|
+
|
|
66
|
+
})();
|
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
// ==UserScript==
|
|
2
|
+
// @name CamWhores PervertMonkey
|
|
3
|
+
// @namespace pervertmonkey
|
|
4
|
+
// @version 3.0.4
|
|
5
|
+
// @author violent-orangutan
|
|
6
|
+
// @description Infinite scroll [optional]. Filter by Title, Duration and Private/Public. Mass friend request button. Download button
|
|
7
|
+
// @license MIT
|
|
8
|
+
// @icon https://www.google.com/s2/favicons?sz=64&domain=camwhores.tv
|
|
9
|
+
// @homepage https://github.com/smartacephale/sleazy-fork
|
|
10
|
+
// @homepageURL https://github.com/smartacephale/sleazy-fork
|
|
11
|
+
// @source github:smartacephale/sleazy-fork
|
|
12
|
+
// @supportURL https://github.com/smartacephale/sleazy-fork/issues
|
|
13
|
+
// @match https://*.camwhores.tv
|
|
14
|
+
// @match https://*.camwhores.*/*
|
|
15
|
+
// @exclude https://*.camwhores.tv/*mode=async*
|
|
16
|
+
// @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.8/dist/core/pervertmonkey.core.umd.js
|
|
17
|
+
// @require data:application/javascript,var core = window.pervertmonkey.core || pervertmonkey.core; var utils = core;
|
|
18
|
+
// @grant GM_addStyle
|
|
19
|
+
// @grant unsafeWindow
|
|
20
|
+
// @run-at document-idle
|
|
21
|
+
// ==/UserScript==
|
|
22
|
+
|
|
23
|
+
(function (core, utils) {
|
|
24
|
+
'use strict';
|
|
25
|
+
|
|
26
|
+
class LSKDB {
|
|
27
|
+
constructor(prefix = "lsm-", lockKey = "lsmngr-lock") {
|
|
28
|
+
this.prefix = prefix;
|
|
29
|
+
this.lockKey = lockKey;
|
|
30
|
+
}
|
|
31
|
+
prefixedKey(key) {
|
|
32
|
+
return `${this.prefix}${key}`;
|
|
33
|
+
}
|
|
34
|
+
getAllKeys() {
|
|
35
|
+
const res = [];
|
|
36
|
+
for (const key in localStorage) {
|
|
37
|
+
if (key.startsWith(this.prefix)) {
|
|
38
|
+
res.push(key.slice(this.prefix.length));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return res;
|
|
42
|
+
}
|
|
43
|
+
getKeys(n = 12, remove = true) {
|
|
44
|
+
const res = [];
|
|
45
|
+
for (const key in localStorage) {
|
|
46
|
+
if (res.length >= n) break;
|
|
47
|
+
if (key.startsWith(this.prefix)) {
|
|
48
|
+
res.push(key.slice(this.prefix.length));
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (remove) {
|
|
52
|
+
res.forEach((k) => this.removeKey(k));
|
|
53
|
+
}
|
|
54
|
+
return res;
|
|
55
|
+
}
|
|
56
|
+
hasKey(key) {
|
|
57
|
+
return localStorage.getItem(this.prefixedKey(key)) !== null;
|
|
58
|
+
}
|
|
59
|
+
removeKey(key) {
|
|
60
|
+
localStorage.removeItem(this.prefixedKey(key));
|
|
61
|
+
}
|
|
62
|
+
setKey(key) {
|
|
63
|
+
localStorage.setItem(this.prefixedKey(key), "");
|
|
64
|
+
}
|
|
65
|
+
isLocked() {
|
|
66
|
+
const lock = parseInt(localStorage.getItem(this.lockKey));
|
|
67
|
+
const locktime = 5 * 60 * 1e3;
|
|
68
|
+
return !(!lock || Date.now() - lock > locktime);
|
|
69
|
+
}
|
|
70
|
+
lock(value) {
|
|
71
|
+
if (value) {
|
|
72
|
+
localStorage.setItem(this.lockKey, JSON.stringify(Date.now()));
|
|
73
|
+
} else {
|
|
74
|
+
localStorage.removeItem(this.lockKey);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
var _GM_addStyle = (() => typeof GM_addStyle != "undefined" ? GM_addStyle : undefined)();
|
|
80
|
+
var _unsafeWindow = (() => typeof unsafeWindow != "undefined" ? unsafeWindow : undefined)();
|
|
81
|
+
|
|
82
|
+
const $ = _unsafeWindow.$;
|
|
83
|
+
_GM_addStyle(`
|
|
84
|
+
.item.private .thumb, .item .thumb.private { opacity: 1 !important; }
|
|
85
|
+
.haveNoAccess { background: linear-gradient(to bottom, #b50000 0%, #2c2c2c 100%) red !important; }
|
|
86
|
+
.haveAccess { background: linear-gradient(to bottom, #4e9299 0%, #2c2c2c 100%) green !important; }
|
|
87
|
+
.friend-button { background: radial-gradient(#5ccbf4, #e1ccb1) !important; }
|
|
88
|
+
`);
|
|
89
|
+
const IS_MEMBER_PAGE = /^(\/members\/\d+\/|\/my\/)$/.test(location.pathname);
|
|
90
|
+
const IS_MESSAGES = /^\/my\/messages\//.test(location.pathname);
|
|
91
|
+
const IS_COMMUNITY_LIST = /\/members\/$/.test(location.pathname);
|
|
92
|
+
const IS_VIDEO_PAGE = /^(\/videos)?\/\d+\//.test(location.pathname);
|
|
93
|
+
const IS_LOGGED_IN = document.cookie.includes("kt_member");
|
|
94
|
+
const rules = new core.RulesGlobal({
|
|
95
|
+
containerSelector: '[id*="playlist"]:has(> .item .title),[id*="videos"]:has(> .item .title),form:has(>.item .title)',
|
|
96
|
+
paginationStrategyOptions: {
|
|
97
|
+
paginationSelector: ".pagination:not([id *= member])",
|
|
98
|
+
overwritePaginationLast: IS_MEMBER_PAGE ? () => 1 : (x) => x === 9 ? 9999 : x
|
|
99
|
+
},
|
|
100
|
+
getThumbImgDataAttrSelector: "data-original",
|
|
101
|
+
getThumbImgDataStrategy: "auto",
|
|
102
|
+
thumbsSelector: ".list-videos .item, .playlist .item, .list-playlists > div > .item, .item:has(.title)",
|
|
103
|
+
gropeStrategy: "all-in-all",
|
|
104
|
+
getThumbDataStrategy: "auto-select",
|
|
105
|
+
customThumbDataSelectors: {
|
|
106
|
+
private: { type: "boolean", selector: "[class*=private]" }
|
|
107
|
+
},
|
|
108
|
+
customDataSelectorFns: [
|
|
109
|
+
"filterInclude",
|
|
110
|
+
"filterExclude",
|
|
111
|
+
"filterDuration",
|
|
112
|
+
{
|
|
113
|
+
filterPrivate: (e, state) => state.filterPrivate && e.private
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
filterPublic: (e, state) => state.filterPublic && !e.private
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
schemeOptions: [
|
|
120
|
+
"Text Filter",
|
|
121
|
+
"Duration Filter",
|
|
122
|
+
"Privacy Filter",
|
|
123
|
+
"Badge",
|
|
124
|
+
{
|
|
125
|
+
title: "Advanced",
|
|
126
|
+
content: [
|
|
127
|
+
{
|
|
128
|
+
autoRequestAccess: false,
|
|
129
|
+
label: "auto send friend request on check access"
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
],
|
|
134
|
+
animatePreview
|
|
135
|
+
});
|
|
136
|
+
function animatePreview(container) {
|
|
137
|
+
const tick = new utils.Tick(500);
|
|
138
|
+
function killjquery(n = 10) {
|
|
139
|
+
if (n > 0) {
|
|
140
|
+
n--;
|
|
141
|
+
$("img[data-cnt]").off();
|
|
142
|
+
setTimeout(() => killjquery(n), 250);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
killjquery();
|
|
146
|
+
function rotateImg(src, count) {
|
|
147
|
+
return src.replace(/(\d)(?=\.jpg$)/, (_, n) => `${utils.circularShift(parseInt(n), count)}`);
|
|
148
|
+
}
|
|
149
|
+
utils.OnHover.create(
|
|
150
|
+
container,
|
|
151
|
+
(target) => target.tagName === "IMG" && target.classList.contains("thumb") && !!target.getAttribute("src") && !/data:image|avatar/.test(target.getAttribute("src")),
|
|
152
|
+
(_target) => {
|
|
153
|
+
const target = _target;
|
|
154
|
+
const origin = target.src;
|
|
155
|
+
const count = parseInt(target.getAttribute("data-cnt")) || 5;
|
|
156
|
+
tick.start(
|
|
157
|
+
() => {
|
|
158
|
+
target.src = rotateImg(target.src, count);
|
|
159
|
+
},
|
|
160
|
+
() => {
|
|
161
|
+
target.src = origin;
|
|
162
|
+
}
|
|
163
|
+
);
|
|
164
|
+
return {
|
|
165
|
+
leaveTarget: target.closest(".item")
|
|
166
|
+
};
|
|
167
|
+
},
|
|
168
|
+
() => tick.stop()
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
const createDownloadButton = () => utils.downloader({
|
|
172
|
+
append: ".tabs-menu > ul",
|
|
173
|
+
after: "",
|
|
174
|
+
button: '<li><a href="#tab_comments" class="toggle-button" style="text-decoration: none;">download 📼</a></li>',
|
|
175
|
+
cbBefore: () => $(".fp-ui").click()
|
|
176
|
+
});
|
|
177
|
+
const DEFAULT_FRIEND_REQUEST_FORMDATA = utils.objectToFormData({
|
|
178
|
+
message: "",
|
|
179
|
+
action: "add_to_friends_complete",
|
|
180
|
+
function: "get_block",
|
|
181
|
+
block_id: "member_profile_view_view_profile",
|
|
182
|
+
format: "json",
|
|
183
|
+
mode: "async"
|
|
184
|
+
});
|
|
185
|
+
const lskdb = new LSKDB();
|
|
186
|
+
async function friendRequest(id) {
|
|
187
|
+
const url = Number.isInteger(id) ? `${location.origin}/members/${id}/` : id;
|
|
188
|
+
await fetch(url, { body: DEFAULT_FRIEND_REQUEST_FORMDATA, method: "post" });
|
|
189
|
+
}
|
|
190
|
+
function getMemberLinks(e) {
|
|
191
|
+
return Array.from(
|
|
192
|
+
e?.querySelectorAll(".item > a") || [],
|
|
193
|
+
(l) => l.href
|
|
194
|
+
).filter((l) => /\/members\/\d+\/$/.test(l));
|
|
195
|
+
}
|
|
196
|
+
async function getMemberFriends(id) {
|
|
197
|
+
const url = new URL(
|
|
198
|
+
IS_COMMUNITY_LIST ? "/members/" : `/members/${id}/friends/`,
|
|
199
|
+
location.origin
|
|
200
|
+
);
|
|
201
|
+
const doc = await utils.fetchHtml(url.href);
|
|
202
|
+
const paginationStrategy = core.getPaginationStrategy({
|
|
203
|
+
doc,
|
|
204
|
+
url,
|
|
205
|
+
overwritePaginationLast: (x) => x === 9 ? 999 : x
|
|
206
|
+
});
|
|
207
|
+
const gen = core.InfiniteScroller.generatorForPaginationStrategy(paginationStrategy);
|
|
208
|
+
for (const url2 in gen) {
|
|
209
|
+
const doc2 = await utils.fetchHtml(url2);
|
|
210
|
+
getMemberLinks(doc2).forEach((a) => {
|
|
211
|
+
const id2 = a.match(/\d+/)?.[0];
|
|
212
|
+
lskdb.setKey(id2);
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
await processFriendship();
|
|
216
|
+
}
|
|
217
|
+
let processFriendshipStarted = false;
|
|
218
|
+
async function processFriendship(batchSize = 1, interval = 5e3) {
|
|
219
|
+
if (lskdb.isLocked()) return;
|
|
220
|
+
const friendlist = lskdb.getKeys(batchSize);
|
|
221
|
+
if (friendlist?.length < 1) return;
|
|
222
|
+
if (!processFriendshipStarted) {
|
|
223
|
+
processFriendshipStarted = true;
|
|
224
|
+
console.log("processFriendshipStarted");
|
|
225
|
+
}
|
|
226
|
+
lskdb.lock(true);
|
|
227
|
+
const urls = friendlist.map((id) => `${location.origin}/members/${id}/`);
|
|
228
|
+
for (const url of urls) {
|
|
229
|
+
await utils.wait(interval);
|
|
230
|
+
await friendRequest(url);
|
|
231
|
+
}
|
|
232
|
+
lskdb.lock(false);
|
|
233
|
+
await processFriendship();
|
|
234
|
+
}
|
|
235
|
+
function createPrivateVideoFriendButton() {
|
|
236
|
+
if (!document.querySelector(".no-player")) return;
|
|
237
|
+
const member = document.querySelector(".no-player a")?.href;
|
|
238
|
+
const button = utils.parseHtml(
|
|
239
|
+
'<button class="friend-button"><span>Friend Request</span></button>'
|
|
240
|
+
);
|
|
241
|
+
document.querySelector(".no-player .message")?.append(button);
|
|
242
|
+
button.addEventListener("click", () => friendRequest(member), { once: true });
|
|
243
|
+
}
|
|
244
|
+
function createFriendButton() {
|
|
245
|
+
const button = utils.parseHtml(
|
|
246
|
+
'<a href="#friend_everyone" class="button friend-button"><span>Friend Everyone</span></a>'
|
|
247
|
+
);
|
|
248
|
+
document.querySelector(".main-container-user > .headline, .headline")?.append(button);
|
|
249
|
+
const memberid = location.pathname.match(/\d+/)?.[0];
|
|
250
|
+
button.addEventListener(
|
|
251
|
+
"click",
|
|
252
|
+
() => {
|
|
253
|
+
button.style.background = "radial-gradient(#ff6114, #5babc4)";
|
|
254
|
+
button.innerText = "processing requests";
|
|
255
|
+
getMemberFriends(memberid).then(() => {
|
|
256
|
+
button.style.background = "radial-gradient(blue, lightgreen)";
|
|
257
|
+
button.innerText = "friend requests sent";
|
|
258
|
+
});
|
|
259
|
+
},
|
|
260
|
+
{ once: true }
|
|
261
|
+
);
|
|
262
|
+
}
|
|
263
|
+
async function requestAccess() {
|
|
264
|
+
checkPrivateVidsAccess();
|
|
265
|
+
setTimeout(processFriendship, 5e3);
|
|
266
|
+
}
|
|
267
|
+
async function checkPrivateVidsAccess() {
|
|
268
|
+
const checkAccess = async (item) => {
|
|
269
|
+
const videoURL = item.firstElementChild.href;
|
|
270
|
+
const doc = await utils.fetchHtml(videoURL);
|
|
271
|
+
if (!doc.querySelector(".player")) return;
|
|
272
|
+
const haveAccess = !doc.querySelector(".no-player");
|
|
273
|
+
if (!haveAccess && rules.store.state.autoRequestAccess) {
|
|
274
|
+
const anchor = doc.querySelector(".message a");
|
|
275
|
+
const uid = anchor?.href.match(/\d+/)?.at(-1);
|
|
276
|
+
lskdb.setKey(uid);
|
|
277
|
+
}
|
|
278
|
+
item.classList.add(haveAccess ? "haveAccess" : "haveNoAccess");
|
|
279
|
+
};
|
|
280
|
+
const thumbs = document.querySelectorAll(
|
|
281
|
+
".item.private:not(.haveAccess,.haveNoAccess)"
|
|
282
|
+
);
|
|
283
|
+
for (const thumb of thumbs) {
|
|
284
|
+
await checkAccess(thumb);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
function getUserInfo(e) {
|
|
288
|
+
const uploadedCount = utils.querySelectorLastNumber("#list_videos_uploaded_videos strong", e);
|
|
289
|
+
const friendsCount = utils.querySelectorLastNumber("#list_members_friends .headline", e);
|
|
290
|
+
return { uploadedCount, friendsCount };
|
|
291
|
+
}
|
|
292
|
+
async function acceptFriendRequest(id) {
|
|
293
|
+
const url = new URL(`/my/messages/${id}/`, location.origin);
|
|
294
|
+
const memberUrl = new URL(`/members/${id}/`, location.origin);
|
|
295
|
+
await fetch(url, {
|
|
296
|
+
headers: {
|
|
297
|
+
Accept: "*/*",
|
|
298
|
+
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
|
|
299
|
+
},
|
|
300
|
+
body: `action=confirm_add_to_friends&message_from_user_id=${id}&function=get_block&block_id=list_messages_my_conversation_messages&confirm=Confirm&format=json&mode=async`,
|
|
301
|
+
method: "POST"
|
|
302
|
+
});
|
|
303
|
+
await utils.fetchHtml(memberUrl).then(
|
|
304
|
+
(doc) => console.log("userInfo", memberUrl.href, getUserInfo(doc))
|
|
305
|
+
);
|
|
306
|
+
}
|
|
307
|
+
async function clearMessages() {
|
|
308
|
+
const pages = core.InfiniteScroller.generatorForPaginationStrategy(
|
|
309
|
+
core.getPaginationStrategy({
|
|
310
|
+
overwritePaginationLast: (x) => x === 9 ? 999 : x
|
|
311
|
+
})
|
|
312
|
+
);
|
|
313
|
+
for await (const p of pages) {
|
|
314
|
+
const doc = await utils.fetchHtml(p.url);
|
|
315
|
+
const messages = Array.from(
|
|
316
|
+
doc.querySelectorAll(
|
|
317
|
+
"#list_members_my_conversations_items .item > a"
|
|
318
|
+
) || []
|
|
319
|
+
).map((a) => a.href);
|
|
320
|
+
for (const m of messages) {
|
|
321
|
+
await checkMessageHistory(m);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
async function deleteMessage(url, id) {
|
|
325
|
+
const deleteURL = `${url}?mode=async&format=json&function=get_block&block_id=list_messages_my_conversation_messages&action=delete_conversation&conversation_user_id=${id}`;
|
|
326
|
+
await fetch(deleteURL);
|
|
327
|
+
}
|
|
328
|
+
async function getConversation(url) {
|
|
329
|
+
const doc = await utils.fetchHtml(url);
|
|
330
|
+
const hasFriendRequest = !!doc.querySelector("input[value=confirm_add_to_friends]");
|
|
331
|
+
const originalText = utils.querySelectorText(doc, ".original-text");
|
|
332
|
+
const id = url.match(/\d+/)?.[0];
|
|
333
|
+
const messages = utils.querySelectorText(doc, ".list-messages");
|
|
334
|
+
return {
|
|
335
|
+
id,
|
|
336
|
+
hasFriendRequest,
|
|
337
|
+
originalText,
|
|
338
|
+
messages
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
async function checkMessageHistory(url) {
|
|
342
|
+
const { originalText, hasFriendRequest, id, messages } = await getConversation(url);
|
|
343
|
+
if (!(originalText || hasFriendRequest)) {
|
|
344
|
+
await deleteMessage(url, id);
|
|
345
|
+
} else {
|
|
346
|
+
console.log({ originalText, url, messages });
|
|
347
|
+
if (hasFriendRequest) {
|
|
348
|
+
await acceptFriendRequest(id);
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
const FRIEND_REQUEST_INTERVAL = 5e3;
|
|
354
|
+
if (IS_LOGGED_IN) {
|
|
355
|
+
setTimeout(processFriendship, FRIEND_REQUEST_INTERVAL);
|
|
356
|
+
if (IS_MEMBER_PAGE || IS_COMMUNITY_LIST) {
|
|
357
|
+
createFriendButton();
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
if (IS_VIDEO_PAGE) {
|
|
361
|
+
createDownloadButton();
|
|
362
|
+
createPrivateVideoFriendButton();
|
|
363
|
+
}
|
|
364
|
+
if (IS_MESSAGES) {
|
|
365
|
+
const button = utils.parseHtml("<button>clear messages</button>");
|
|
366
|
+
document.querySelector(".headline")?.append(button);
|
|
367
|
+
button.addEventListener("click", clearMessages);
|
|
368
|
+
}
|
|
369
|
+
rules.store.eventSubject.subscribe((event) => {
|
|
370
|
+
if (event.includes("check access")) {
|
|
371
|
+
requestAccess();
|
|
372
|
+
}
|
|
373
|
+
});
|
|
374
|
+
|
|
375
|
+
})(core, utils);
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// ==UserScript==
|
|
2
|
+
// @name E-Hentai PervertMonkey
|
|
3
|
+
// @namespace pervertmonkey
|
|
4
|
+
// @version 1.0.0
|
|
5
|
+
// @author violent-orangutan
|
|
6
|
+
// @description Infinite scroll [optional], Filter by Title
|
|
7
|
+
// @license MIT
|
|
8
|
+
// @icon https://www.google.com/s2/favicons?sz=64&domain=e-hentai.org
|
|
9
|
+
// @homepage https://github.com/smartacephale/sleazy-fork
|
|
10
|
+
// @homepageURL https://github.com/smartacephale/sleazy-fork
|
|
11
|
+
// @source github:smartacephale/sleazy-fork
|
|
12
|
+
// @supportURL https://github.com/smartacephale/sleazy-fork/issues
|
|
13
|
+
// @match https://*.e-hentai.org/*
|
|
14
|
+
// @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.8/dist/core/pervertmonkey.core.umd.js
|
|
15
|
+
// @require data:application/javascript,var core = window.pervertmonkey.core || pervertmonkey.core; var utils = core;
|
|
16
|
+
// @grant GM_addStyle
|
|
17
|
+
// @grant unsafeWindow
|
|
18
|
+
// @run-at document-idle
|
|
19
|
+
// ==/UserScript==
|
|
20
|
+
|
|
21
|
+
(function (core, utils) {
|
|
22
|
+
'use strict';
|
|
23
|
+
|
|
24
|
+
new core.RulesGlobal({
|
|
25
|
+
thumbsSelector: ".gl1t",
|
|
26
|
+
titleSelector: ".glname",
|
|
27
|
+
containerSelectorLast: ".itg.gld",
|
|
28
|
+
getThumbImgDataAttrSelector: "data-lazy-load",
|
|
29
|
+
getThumbImgDataStrategy: "auto",
|
|
30
|
+
paginationStrategyOptions: createPaginationStrategyOptions(),
|
|
31
|
+
customDataSelectorFns: ["filterInclude", "filterExclude"],
|
|
32
|
+
schemeOptions: ["Text Filter", "Badge", "Advanced"]
|
|
33
|
+
});
|
|
34
|
+
function createPaginationStrategyOptions() {
|
|
35
|
+
let nextLink;
|
|
36
|
+
function getPaginationUrlGenerator() {
|
|
37
|
+
function getNextLink(doc = document) {
|
|
38
|
+
return [...doc.querySelectorAll("a#dnext[href]")].pop()?.href;
|
|
39
|
+
}
|
|
40
|
+
const paginationUrlGenerator = async (_) => {
|
|
41
|
+
if (!nextLink) {
|
|
42
|
+
nextLink = getNextLink();
|
|
43
|
+
return nextLink;
|
|
44
|
+
}
|
|
45
|
+
const doc = await utils.fetchHtml(nextLink);
|
|
46
|
+
nextLink = getNextLink(doc);
|
|
47
|
+
return nextLink;
|
|
48
|
+
};
|
|
49
|
+
return paginationUrlGenerator;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
paginationSelector: ".searchnav + div + .searchnav",
|
|
53
|
+
overwritePaginationLast: () => 9999999,
|
|
54
|
+
getPaginationUrlGenerator
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function setThumbnailMode() {
|
|
58
|
+
const IS_SEARCH_PAGE = /f_search/.test(location.search) || /^\/tag\//.test(location.pathname);
|
|
59
|
+
if (!IS_SEARCH_PAGE) return;
|
|
60
|
+
const selectInputT = document.querySelector("option[value=t]");
|
|
61
|
+
if (selectInputT) {
|
|
62
|
+
const select = selectInputT.parentElement;
|
|
63
|
+
if (select.value === "t") return;
|
|
64
|
+
select.value = "t";
|
|
65
|
+
select.dispatchEvent(new Event("change"));
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
setThumbnailMode();
|
|
69
|
+
|
|
70
|
+
})(core, utils);
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// ==UserScript==
|
|
2
|
+
// @name Ebalka PervertMonkey
|
|
3
|
+
// @namespace pervertmonkey
|
|
4
|
+
// @version 3.0.1
|
|
5
|
+
// @author violent-orangutan
|
|
6
|
+
// @description Infinite scroll [optional], Filter by Title and Duration
|
|
7
|
+
// @license MIT
|
|
8
|
+
// @icon https://www.google.com/s2/favicons?sz=64&domain=ebalka.zip
|
|
9
|
+
// @homepage https://github.com/smartacephale/sleazy-fork
|
|
10
|
+
// @homepageURL https://github.com/smartacephale/sleazy-fork
|
|
11
|
+
// @source github:smartacephale/sleazy-fork
|
|
12
|
+
// @supportURL https://github.com/smartacephale/sleazy-fork/issues
|
|
13
|
+
// @match https://b.ebalka.zip/*
|
|
14
|
+
// @match https://a.ebalka.love/*
|
|
15
|
+
// @match https://*ebalka.*.*/*
|
|
16
|
+
// @match https://*.ebalk*.*/*
|
|
17
|
+
// @match https://*.fuckingbear*.*/*
|
|
18
|
+
// @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.8/dist/core/pervertmonkey.core.umd.js
|
|
19
|
+
// @require data:application/javascript,var core = window.pervertmonkey.core || pervertmonkey.core; var utils = core;
|
|
20
|
+
// @grant GM_addStyle
|
|
21
|
+
// @grant unsafeWindow
|
|
22
|
+
// @run-at document-idle
|
|
23
|
+
// ==/UserScript==
|
|
24
|
+
|
|
25
|
+
(function (core, utils) {
|
|
26
|
+
'use strict';
|
|
27
|
+
|
|
28
|
+
new core.RulesGlobal({
|
|
29
|
+
containerSelectorLast: ".content__video",
|
|
30
|
+
paginationStrategyOptions: {
|
|
31
|
+
paginationSelector: ".pagination:not([id *= member])"
|
|
32
|
+
},
|
|
33
|
+
thumbsSelector: ".card_video",
|
|
34
|
+
titleSelector: ".card__title",
|
|
35
|
+
durationSelector: ".card__spot > span:last-child",
|
|
36
|
+
animatePreview,
|
|
37
|
+
schemeOptions: ["Text Filter", "Badge", "Duration Filter", "Advanced"]
|
|
38
|
+
});
|
|
39
|
+
function animatePreview(container) {
|
|
40
|
+
function animateThumb(thumb) {
|
|
41
|
+
const el = thumb.querySelector(".card__thumb_video");
|
|
42
|
+
el.classList.toggle("video-on");
|
|
43
|
+
const src = el.querySelector(".card__image")?.getAttribute("data-preview");
|
|
44
|
+
const videoElem = utils.parseHtml(`<video style="position: absolute; left: 0px; top: 0px; visibility: visible; margin-top: -1px;"
|
|
45
|
+
autoplay="" loop="" playsinline="true" webkit-playsinline="true" src="${src}"></video>`);
|
|
46
|
+
el.appendChild(videoElem);
|
|
47
|
+
return () => {
|
|
48
|
+
el.classList.toggle("video-on");
|
|
49
|
+
utils.exterminateVideo(videoElem);
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
utils.OnHover.create(
|
|
53
|
+
container,
|
|
54
|
+
(target) => target.tagName === "IMG",
|
|
55
|
+
(target) => {
|
|
56
|
+
const thumb = target.closest(".card");
|
|
57
|
+
const onOverCallback = animateThumb(thumb);
|
|
58
|
+
return { leaveTarget: thumb, onOverCallback };
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
})(core, utils);
|