pervert-monkey 1.0.11 → 1.0.13
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/README.md +22 -11
- package/dist/core/pervertmonkey.core.es.d.ts +25 -16
- package/dist/core/pervertmonkey.core.es.js +712 -61
- package/dist/core/pervertmonkey.core.es.js.map +1 -1
- package/dist/core/pervertmonkey.core.umd.js +712 -61
- package/dist/core/pervertmonkey.core.umd.js.map +1 -1
- package/dist/userscripts/3hentai.user.js +19 -26
- package/dist/userscripts/camgirlfinder.user.js +2 -2
- package/dist/userscripts/camwhores.user.js +12 -16
- package/dist/userscripts/e-hentai.user.js +3 -4
- package/dist/userscripts/ebalka.user.js +6 -11
- package/dist/userscripts/eporner.user.js +11 -16
- package/dist/userscripts/erome.user.js +2 -2
- package/dist/userscripts/eroprofile.user.js +2 -2
- package/dist/userscripts/javhdporn.user.js +2 -2
- package/dist/userscripts/missav.user.js +2 -2
- package/dist/userscripts/motherless.user.js +22 -42
- package/dist/userscripts/namethatporn.user.js +5 -4
- package/dist/userscripts/nhentai.user.js +3 -3
- package/dist/userscripts/obmenvsem.user.js +18 -4
- package/dist/userscripts/pornhub.user.js +9 -12
- package/dist/userscripts/spankbang.user.js +6 -38
- package/dist/userscripts/thisvid.user.js +20 -22
- package/dist/userscripts/xhamster.user.js +13 -16
- package/dist/userscripts/xvideos.user.js +7 -12
- package/package.json +1 -1
- package/src/core/data-handler/data-manager.ts +4 -4
- package/src/core/jabroni-config/index.ts +3 -2
- package/src/core/jabroni-config/jabroni-gui-controller.ts +61 -0
- package/src/core/parsers/thumb-data-parser.ts +10 -1
- package/src/core/rules/index.ts +12 -39
- package/src/userscripts/index.ts +1 -1
- package/src/userscripts/scripts/3hentai.ts +20 -24
- package/src/userscripts/scripts/camgirlfinder.ts +1 -1
- package/src/userscripts/scripts/camwhores.ts +10 -17
- package/src/userscripts/scripts/e-hentai.ts +1 -1
- package/src/userscripts/scripts/ebalka.ts +7 -12
- package/src/userscripts/scripts/eporner.ts +8 -14
- package/src/userscripts/scripts/erome.ts +1 -1
- package/src/userscripts/scripts/eroprofile.ts +3 -3
- package/src/userscripts/scripts/javhdporn.ts +1 -1
- package/src/userscripts/scripts/missav.ts +1 -1
- package/src/userscripts/scripts/motherless.ts +19 -48
- package/src/userscripts/scripts/namethatporn.ts +1 -1
- package/src/userscripts/scripts/nhentai.ts +1 -1
- package/src/userscripts/scripts/obmenvsem.ts +1 -1
- package/src/userscripts/scripts/pornhub.ts +1 -1
- package/src/userscripts/scripts/spankbang.ts +1 -1
- package/src/userscripts/scripts/thisvid.ts +18 -19
- package/src/userscripts/scripts/xhamster.ts +10 -11
- package/src/userscripts/scripts/xvideos.ts +6 -11
- package/src/utils/dom/index.ts +10 -0
- package/src/utils/events/on-hover.ts +17 -25
- package/src/utils/events/tick.ts +1 -3
- package/src/utils/parsers/index.ts +16 -0
package/README.md
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
<h1 align="center">PervertMonkey</h1>
|
|
2
2
|
|
|
3
|
-
<img alt="Static Badge" src="https://img.shields.io/badge/Tampermonkey-OK-aliceblue?labelColor=lightblue"> <img alt="Static Badge" src="https://img.shields.io/badge/Violentmonkey-OK-slategray?labelColor=skyblue">
|
|
3
|
+
<p align="center"><img alt="Static Badge" src="https://img.shields.io/badge/Tampermonkey-OK-aliceblue?labelColor=lightblue"> <img alt="Static Badge" src="https://img.shields.io/badge/Violentmonkey-OK-slategray?labelColor=skyblue">
|
|
4
|
+
</p>
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
<p align="center"><code>install scripts:</code> https://sleazyfork.org/en/scripts?set=590816</p>
|
|
6
7
|
|
|
7
8
|
## Userscripts
|
|
8
9
|
```shell
|
|
9
|
-
src/userscripts/scripts
|
|
10
|
+
src/userscripts/scripts # dev
|
|
11
|
+
dist/userscripts # build
|
|
10
12
|
```
|
|
11
13
|
|
|
12
14
|
## Build
|
|
@@ -22,21 +24,30 @@ npm run dev
|
|
|
22
24
|
```
|
|
23
25
|
|
|
24
26
|
## How it works
|
|
27
|
+
<p align="center"><img src="https://i.makeagif.com/media/5-30-2015/-SdGmN.gif"></p>
|
|
28
|
+
|
|
25
29
|
#### So... Listen to this!
|
|
26
|
-
If you are lucky, you can build your own userscript with infinite scroller and content filters with just this setup:
|
|
30
|
+
If you are lucky monkey, you can build your own userscript with infinite scroller and content filters with just this setup:
|
|
27
31
|
|
|
28
32
|
```typescript
|
|
29
33
|
// replace with selectors of your own
|
|
30
|
-
const rules = new
|
|
31
|
-
containerSelector: '
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
const rules = new Rules({
|
|
35
|
+
containerSelector: '.content',
|
|
36
|
+
thumbs: {
|
|
37
|
+
selector: '.thumb',
|
|
38
|
+
},
|
|
39
|
+
thumb: {
|
|
40
|
+
selectors: {
|
|
41
|
+
title: '.title',
|
|
42
|
+
duration: '.duration'
|
|
43
|
+
},
|
|
44
|
+
},
|
|
35
45
|
schemeOptions: ['Text Filter', 'Badge', 'Duration Filter', 'Advanced'],
|
|
36
46
|
});
|
|
37
47
|
```
|
|
38
48
|
|
|
39
|
-
|
|
49
|
+
> [!TIP]
|
|
50
|
+
> Use `Rules` from `src/core/rules` as documentation
|
|
40
51
|
|
|
41
52
|
_see you space cowboy 😘_
|
|
42
53
|
|
|
@@ -46,11 +46,11 @@ declare interface DataFilterResult {
|
|
|
46
46
|
|
|
47
47
|
export declare class DataManager {
|
|
48
48
|
private rules;
|
|
49
|
-
private
|
|
49
|
+
private parentHomogenity?;
|
|
50
50
|
data: Map<string, DataElement>;
|
|
51
51
|
private lazyImgLoader;
|
|
52
52
|
dataFilter: DataFilter;
|
|
53
|
-
constructor(rules: Rules,
|
|
53
|
+
constructor(rules: Rules, parentHomogenity?: Parameters<typeof checkHomogenity>[2] | undefined);
|
|
54
54
|
applyFilters: (filters?: Record<string, boolean>, offset?: number) => Promise<void>;
|
|
55
55
|
filterAll: (offset?: number) => Promise<void>;
|
|
56
56
|
parseData: (html: HTMLElement, container?: HTMLElement, removeDuplicates?: boolean, shouldLazify?: boolean) => void;
|
|
@@ -213,6 +213,18 @@ declare type IScrollerSubject = {
|
|
|
213
213
|
page: HTMLElement;
|
|
214
214
|
};
|
|
215
215
|
|
|
216
|
+
declare class JabronioGuiController {
|
|
217
|
+
private store;
|
|
218
|
+
private dataManager;
|
|
219
|
+
constructor(store: JabronioStore, dataManager: DataManager);
|
|
220
|
+
private readonly destroy$;
|
|
221
|
+
dispose(): void;
|
|
222
|
+
private directionalEventObservable$?;
|
|
223
|
+
private directionalEvent;
|
|
224
|
+
private readonly eventsMap;
|
|
225
|
+
private setupStoreListeners;
|
|
226
|
+
}
|
|
227
|
+
|
|
216
228
|
export declare class LazyImgLoader {
|
|
217
229
|
lazyImgObserver: Observer;
|
|
218
230
|
private attributeName;
|
|
@@ -250,18 +262,13 @@ export declare type OffsetGenerator<T = GeneratorResult> = Generator<T> | AsyncG
|
|
|
250
262
|
|
|
251
263
|
export declare class OnHover {
|
|
252
264
|
private container;
|
|
253
|
-
private
|
|
265
|
+
private targetSelector;
|
|
254
266
|
private onOver;
|
|
255
|
-
private
|
|
256
|
-
private
|
|
257
|
-
private
|
|
258
|
-
private
|
|
259
|
-
|
|
260
|
-
private onOverFinally;
|
|
261
|
-
constructor(container: HTMLElement, subjectSelector: (target: HTMLElement) => boolean, onOver: (target: HTMLElement) => void | {
|
|
262
|
-
onOverCallback?: () => void;
|
|
263
|
-
leaveTarget?: HTMLElement;
|
|
264
|
-
}, onLeave?: ((target: HTMLElement) => void) | undefined);
|
|
267
|
+
private handleLeave;
|
|
268
|
+
private handleHover;
|
|
269
|
+
private target?;
|
|
270
|
+
private onOverCallback?;
|
|
271
|
+
constructor(container: HTMLElement, targetSelector: string, onOver: (target: HTMLElement) => void | (() => void));
|
|
265
272
|
static create(...args: ConstructorParameters<typeof OnHover>): OnHover;
|
|
266
273
|
}
|
|
267
274
|
|
|
@@ -316,11 +323,13 @@ export declare function parseHtml(html: string): HTMLElement;
|
|
|
316
323
|
|
|
317
324
|
export declare function parseIntegerOr(n: string | number, or: number): number;
|
|
318
325
|
|
|
326
|
+
export declare function parseNumberWithLetter(str: string): number;
|
|
327
|
+
|
|
319
328
|
export declare function parseUrl(s: HTMLAnchorElement | Location | URL | string): URL;
|
|
320
329
|
|
|
321
330
|
declare type Primitive = string | number | boolean;
|
|
322
331
|
|
|
323
|
-
declare type PrimitiveString = 'boolean' | 'string' | 'number' | 'duration';
|
|
332
|
+
declare type PrimitiveString = 'boolean' | 'string' | 'number' | 'float' | 'duration';
|
|
324
333
|
|
|
325
334
|
export declare function querySelectorLast<T extends Element = HTMLElement>(root: ParentNode | undefined, selector: string): T | undefined;
|
|
326
335
|
|
|
@@ -343,7 +352,6 @@ export declare function removeClassesAndDataAttributes(element: HTMLElement, key
|
|
|
343
352
|
export declare function replaceElementTag(e: HTMLElement, tagName: string): HTMLElement;
|
|
344
353
|
|
|
345
354
|
export declare class Rules {
|
|
346
|
-
getThumbUrl(thumb: HTMLElement | HTMLAnchorElement): string;
|
|
347
355
|
thumb: Parameters<typeof ThumbDataParser.create>[0];
|
|
348
356
|
thumbDataParser: ThumbDataParser;
|
|
349
357
|
thumbImg: Parameters<typeof ThumbImgParser.create>[0];
|
|
@@ -366,6 +374,7 @@ export declare class Rules {
|
|
|
366
374
|
schemeOptions: SchemeOptions;
|
|
367
375
|
store: JabronioStore;
|
|
368
376
|
gui: JabronioGUI;
|
|
377
|
+
inputController: JabronioGuiController;
|
|
369
378
|
private createStore;
|
|
370
379
|
private createGui;
|
|
371
380
|
customGenerator?: OffsetGenerator;
|
|
@@ -375,7 +384,6 @@ export declare class Rules {
|
|
|
375
384
|
gropeStrategy: 'all-in-one' | 'all-in-all';
|
|
376
385
|
gropeInit(): void;
|
|
377
386
|
get isEmbedded(): boolean;
|
|
378
|
-
private setupStoreListeners;
|
|
379
387
|
private mutationObservers;
|
|
380
388
|
resetOnPaginationOrContainerDeath: boolean;
|
|
381
389
|
private resetOn;
|
|
@@ -398,6 +406,7 @@ export declare class ThumbDataParser {
|
|
|
398
406
|
callback?: ((thumb: HTMLElement, thumbData: ThumbData) => void) | undefined;
|
|
399
407
|
stringsMeltInTitle: boolean;
|
|
400
408
|
private autoParseText;
|
|
409
|
+
getUrl(thumb: HTMLElement | HTMLAnchorElement): string;
|
|
401
410
|
private preprocessCustomThumbDataSelectors;
|
|
402
411
|
private thumbDataSelectors;
|
|
403
412
|
private readonly defaultThumbDataSelectors;
|