pervert-monkey 1.0.0

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.
Files changed (80) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +62 -0
  3. package/dist/core/pervertmonkey.core.es.d.ts +391 -0
  4. package/dist/core/pervertmonkey.core.es.js +8497 -0
  5. package/dist/core/pervertmonkey.core.es.js.map +1 -0
  6. package/dist/core/pervertmonkey.core.umd.js +8500 -0
  7. package/dist/core/pervertmonkey.core.umd.js.map +1 -0
  8. package/dist/userscripts/3hentai.user.js +1176 -0
  9. package/dist/userscripts/camgirlfinder.user.js +68 -0
  10. package/dist/userscripts/camwhores.user.js +1602 -0
  11. package/dist/userscripts/e-hentai.user.js +1212 -0
  12. package/dist/userscripts/ebalka.user.js +1231 -0
  13. package/dist/userscripts/eporner.user.js +1265 -0
  14. package/dist/userscripts/erome.user.js +1245 -0
  15. package/dist/userscripts/eroprofile.user.js +1194 -0
  16. package/dist/userscripts/javhdporn.user.js +1178 -0
  17. package/dist/userscripts/missav.user.js +1182 -0
  18. package/dist/userscripts/motherless.user.js +1380 -0
  19. package/dist/userscripts/namethatporn.user.js +1218 -0
  20. package/dist/userscripts/nhentai.user.js +1262 -0
  21. package/dist/userscripts/pornhub.user.js +1199 -0
  22. package/dist/userscripts/spankbang.user.js +1239 -0
  23. package/dist/userscripts/xhamster.user.js +1374 -0
  24. package/dist/userscripts/xvideos.user.js +1254 -0
  25. package/package.json +54 -0
  26. package/src/core/data-control/data-filter.ts +143 -0
  27. package/src/core/data-control/data-manager.ts +144 -0
  28. package/src/core/data-control/index.ts +2 -0
  29. package/src/core/infinite-scroll/index.ts +143 -0
  30. package/src/core/jabroni-config/default-scheme.ts +97 -0
  31. package/src/core/jabroni-config/default-store.ts +9 -0
  32. package/src/core/pagination-parsing/index.ts +55 -0
  33. package/src/core/pagination-parsing/pagination-strategies/PaginationStrategy.ts +44 -0
  34. package/src/core/pagination-parsing/pagination-strategies/PaginationStrategyDataParams.ts +66 -0
  35. package/src/core/pagination-parsing/pagination-strategies/PaginationStrategyPathnameParams.ts +77 -0
  36. package/src/core/pagination-parsing/pagination-strategies/PaginationStrategySearchParams.ts +56 -0
  37. package/src/core/pagination-parsing/pagination-strategies/index.ts +4 -0
  38. package/src/core/pagination-parsing/pagination-utils/index.ts +84 -0
  39. package/src/core/rules/index.ts +385 -0
  40. package/src/index.ts +42 -0
  41. package/src/types/index.ts +7 -0
  42. package/src/userscripts/ascii-logos.js +468 -0
  43. package/src/userscripts/index.ts +1 -0
  44. package/src/userscripts/meta.json +11 -0
  45. package/src/userscripts/scripts/3hentai.ts +20 -0
  46. package/src/userscripts/scripts/camgirlfinder.ts +68 -0
  47. package/src/userscripts/scripts/camwhores.ts +382 -0
  48. package/src/userscripts/scripts/e-hentai.ts +68 -0
  49. package/src/userscripts/scripts/ebalka.ts +58 -0
  50. package/src/userscripts/scripts/eporner.ts +90 -0
  51. package/src/userscripts/scripts/erome.ts +105 -0
  52. package/src/userscripts/scripts/eroprofile.ts +38 -0
  53. package/src/userscripts/scripts/javhdporn.ts +24 -0
  54. package/src/userscripts/scripts/missav.ts +28 -0
  55. package/src/userscripts/scripts/motherless.ts +222 -0
  56. package/src/userscripts/scripts/namethatporn.ts +68 -0
  57. package/src/userscripts/scripts/nhentai.ts +135 -0
  58. package/src/userscripts/scripts/pornhub.ts +53 -0
  59. package/src/userscripts/scripts/spankbang.ts +61 -0
  60. package/src/userscripts/scripts/thisvid.ts +716 -0
  61. package/src/userscripts/scripts/xhamster.ts +179 -0
  62. package/src/userscripts/scripts/xvideos.ts +83 -0
  63. package/src/utils/arrays/index.ts +15 -0
  64. package/src/utils/async/index.ts +3 -0
  65. package/src/utils/dom/dom-observers.ts +76 -0
  66. package/src/utils/dom/index.ts +156 -0
  67. package/src/utils/events/index.ts +2 -0
  68. package/src/utils/events/on-pointer-over-and-leave.ts +35 -0
  69. package/src/utils/events/tick.ts +27 -0
  70. package/src/utils/fetch/index.ts +37 -0
  71. package/src/utils/math/index.ts +3 -0
  72. package/src/utils/objects/index.ts +9 -0
  73. package/src/utils/objects/memoize.ts +25 -0
  74. package/src/utils/observers/index.ts +44 -0
  75. package/src/utils/observers/lazy-image-loader.ts +27 -0
  76. package/src/utils/parsers/index.ts +30 -0
  77. package/src/utils/parsers/time-parser.ts +28 -0
  78. package/src/utils/strings/index.ts +10 -0
  79. package/src/utils/strings/regexes.ts +35 -0
  80. package/src/vite-env.d.ts +4 -0
@@ -0,0 +1,61 @@
1
+ import type { MonkeyUserScript } from 'vite-plugin-monkey';
2
+ import { RulesGlobal } from '../../core/rules';
3
+ import { exterminateVideo, parseHtml } from '../../utils/dom';
4
+ import { onPointerOverAndLeave } from '../../utils/events';
5
+
6
+ export const meta: MonkeyUserScript = {
7
+ name: 'SpankBang.com PervertMonkey',
8
+ version: '4.0.0',
9
+ description: 'Infinite scroll [optional]. Filter by Title and Duration',
10
+ match: ["https://*.spankbang.*/*", "https://*.spankbang.com/*"],
11
+ icon: 'https://www.google.com/s2/favicons?sz=64&domain=spankbang.com',
12
+ };
13
+
14
+ const rules = new RulesGlobal({
15
+ containerSelector: '.main-container .js-media-list, .main_content_container .video-list',
16
+ paginationStrategyOptions: {
17
+ paginationSelector: '.paginate-bar, .pagination',
18
+ },
19
+ thumbsSelector: '.video-item:not(.clear-fix), .js-video-item',
20
+ getThumbImgDataStrategy: 'auto',
21
+ titleSelector: '[title]',
22
+ durationSelector: '[data-testid="video-item-length"]',
23
+ gropeStrategy: 'all-in-all',
24
+ schemeOptions: ['Text Filter', 'Duration Filter', 'Badge', 'Advanced'],
25
+ animatePreview,
26
+ });
27
+
28
+ function animatePreview(container: HTMLElement) {
29
+ function createPreviewElement(src: string) {
30
+ return parseHtml(`
31
+ <div class="video-js vjs-controls-disabled vjs-workinghover vjs-v7 vjs-playing vjs-has-started mp4t_video-dimensions vjs-user-inactive"
32
+ id="mp4t_video" tabindex="-1" lang="en" translate="no" role="region" aria-label="Video Player"
33
+ style="opacity: 1;">
34
+ <video id="mp4t_video_html5_api" class="vjs-tech" tabindex="-1" autoplay="autoplay" muted="muted" playsinline="playsinline"
35
+ src="${src}">
36
+ </video>
37
+ </div>`);
38
+ }
39
+
40
+ function animateThumb(e: HTMLElement) {
41
+ const src = e.querySelector('[data-preview]')?.getAttribute('data-preview') as string;
42
+ const vid = createPreviewElement(src);
43
+ e.append(vid);
44
+ return () => {
45
+ const v = vid.querySelector('video') as HTMLVideoElement;
46
+ exterminateVideo(v);
47
+ vid.remove();
48
+ };
49
+ }
50
+
51
+ onPointerOverAndLeave(
52
+ container,
53
+ (e) => e.tagName === 'IMG',
54
+ (e) => {
55
+ const target = e as HTMLImageElement;
56
+ const leaveTarget = target.closest('.thumb') as HTMLElement;
57
+ const onOverCallback = animateThumb(leaveTarget);
58
+ return { leaveTarget, onOverCallback };
59
+ },
60
+ );
61
+ }