pervert-monkey 1.0.26 → 1.0.27
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/core/pervertmonkey.core.es.js +12 -8
- package/dist/core/pervertmonkey.core.es.js.map +1 -1
- package/dist/core/pervertmonkey.core.umd.js +12 -8
- package/dist/core/pervertmonkey.core.umd.js.map +1 -1
- package/dist/userscripts/3hentai.user.js +1 -1
- package/dist/userscripts/camgirlfinder.user.js +1 -1
- package/dist/userscripts/camwhores.user.js +1 -1
- package/dist/userscripts/e-hentai.user.js +1 -1
- package/dist/userscripts/ebalka.user.js +2 -2
- package/dist/userscripts/eporner.user.js +4 -4
- package/dist/userscripts/erome.user.js +1 -1
- package/dist/userscripts/eroprofile.user.js +1 -1
- package/dist/userscripts/javhdporn.user.js +1 -1
- package/dist/userscripts/missav.user.js +1 -1
- package/dist/userscripts/motherless.user.js +1 -1
- package/dist/userscripts/namethatporn.user.js +1 -1
- package/dist/userscripts/nhentai.user.js +1 -1
- package/dist/userscripts/obmenvsem.user.js +1 -1
- package/dist/userscripts/pornhub.user.js +3 -3
- package/dist/userscripts/simpcity.user.js +59 -4
- package/dist/userscripts/socialmediagirls.user.js +1 -1
- package/dist/userscripts/spankbang.user.js +1 -1
- package/dist/userscripts/thisvid.user.js +1 -1
- package/dist/userscripts/xhamster.user.js +1 -1
- package/dist/userscripts/xmegadrive.user.js +82 -0
- package/dist/userscripts/xvideos.user.js +1 -1
- package/package.json +1 -1
- package/src/core/data-handler/data-filter.ts +1 -2
- package/src/core/data-handler/data-manager.ts +11 -3
- package/src/core/rules/index.ts +3 -3
- package/src/userscripts/index.ts +1 -1
- package/src/userscripts/scripts/ebalka.ts +1 -1
- package/src/userscripts/scripts/eporner.ts +3 -3
- package/src/userscripts/scripts/pornhub.ts +3 -1
- package/src/userscripts/scripts/simpcity.ts +72 -5
- package/src/userscripts/scripts/xhamster.ts +1 -1
- package/src/userscripts/scripts/xmegadrive.ts +78 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { MonkeyUserScript } from 'vite-plugin-monkey';
|
|
2
|
+
import { unsafeWindow } from '$';
|
|
3
|
+
import { Rules } from '../../core';
|
|
4
|
+
import { circularShift, OnHover, Tick } from '../../utils';
|
|
5
|
+
|
|
6
|
+
export const meta: MonkeyUserScript = {
|
|
7
|
+
name: 'xmegadrive PervertMonkey',
|
|
8
|
+
version: '1.0.0',
|
|
9
|
+
description:
|
|
10
|
+
'Infinite scroll [optional]. Filter by Title and Duration. Sort by Duration and Views.',
|
|
11
|
+
match: ['https://*.xmegadrive.com/*'],
|
|
12
|
+
exclude: 'https://*.xmegadrive.com/*mode=async*',
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const $ = (unsafeWindow as any).$;
|
|
16
|
+
|
|
17
|
+
const rules = new Rules({
|
|
18
|
+
containerSelector:
|
|
19
|
+
'[id*="playlist"]:has(> .item .title),[id*="videos"]:has(> .item .title),form:has(>.item .title)',
|
|
20
|
+
paginationStrategyOptions: {
|
|
21
|
+
paginationSelector: '.pagination:not([id *= member])',
|
|
22
|
+
},
|
|
23
|
+
thumbs: {
|
|
24
|
+
selector:
|
|
25
|
+
'.list-videos .item, .playlist .item, .list-playlists > div > .item, .item:has(.title)',
|
|
26
|
+
},
|
|
27
|
+
thumb: {
|
|
28
|
+
strategy: 'auto-select',
|
|
29
|
+
selectors: {
|
|
30
|
+
private: { type: 'boolean', selector: '[class*=private]' },
|
|
31
|
+
views: { selector: '.views', type: 'float' },
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
dataManagerOptions: { removeDuplicates: true },
|
|
35
|
+
thumbImg: {
|
|
36
|
+
selector: 'data-original',
|
|
37
|
+
},
|
|
38
|
+
gropeStrategy: 'all-in-all',
|
|
39
|
+
schemeOptions: ['Title Filter', 'Duration Filter', 'Sort By', 'Badge', 'Advanced'],
|
|
40
|
+
animatePreview,
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
function animatePreview(container: HTMLElement) {
|
|
44
|
+
const tick = new Tick(500);
|
|
45
|
+
|
|
46
|
+
function killjquery(n = 10) {
|
|
47
|
+
if (n > 0) {
|
|
48
|
+
n--;
|
|
49
|
+
$('img[data-cnt]').off();
|
|
50
|
+
setTimeout(() => killjquery(n), 250);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
killjquery();
|
|
55
|
+
|
|
56
|
+
function rotateImg(src: string, count: number) {
|
|
57
|
+
return src.replace(/(\d)(?=\.jpg$)/, (_, n) => `${circularShift(parseInt(n), count)}`);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
OnHover.create(
|
|
61
|
+
container,
|
|
62
|
+
'.list-videos .item, .playlist .item, .list-playlists > div > .item, .item:has(.title)',
|
|
63
|
+
(e) => {
|
|
64
|
+
const img = e.querySelector('img') as HTMLImageElement;
|
|
65
|
+
const origin = img.src;
|
|
66
|
+
const count = parseInt(img.getAttribute('data-cnt') as string) || 5;
|
|
67
|
+
tick.start(
|
|
68
|
+
() => {
|
|
69
|
+
img.src = rotateImg(img.src, count);
|
|
70
|
+
},
|
|
71
|
+
() => {
|
|
72
|
+
img.src = origin;
|
|
73
|
+
},
|
|
74
|
+
);
|
|
75
|
+
return () => tick.stop();
|
|
76
|
+
},
|
|
77
|
+
);
|
|
78
|
+
}
|