pervert-monkey 1.0.25 → 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.
Files changed (62) hide show
  1. package/README.md +5 -2
  2. package/dist/core/pervertmonkey.core.es.d.ts +2 -541
  3. package/dist/core/pervertmonkey.core.es.js +8005 -9281
  4. package/dist/core/pervertmonkey.core.es.js.map +1 -1
  5. package/dist/core/pervertmonkey.core.umd.js +8833 -10051
  6. package/dist/core/pervertmonkey.core.umd.js.map +1 -1
  7. package/dist/userscripts/3hentai.user.js +40 -46
  8. package/dist/userscripts/camgirlfinder.user.js +56 -49
  9. package/dist/userscripts/camwhores.user.js +286 -343
  10. package/dist/userscripts/e-hentai.user.js +54 -57
  11. package/dist/userscripts/ebalka.user.js +52 -55
  12. package/dist/userscripts/eporner.user.js +76 -68
  13. package/dist/userscripts/erome.user.js +79 -84
  14. package/dist/userscripts/eroprofile.user.js +28 -29
  15. package/dist/userscripts/javhdporn.user.js +28 -22
  16. package/dist/userscripts/missav.user.js +22 -23
  17. package/dist/userscripts/motherless.user.js +141 -152
  18. package/dist/userscripts/namethatporn.user.js +49 -58
  19. package/dist/userscripts/nhentai.user.js +104 -99
  20. package/dist/userscripts/obmenvsem.user.js +61 -69
  21. package/dist/userscripts/pornhub.user.js +50 -47
  22. package/dist/userscripts/simpcity.user.js +82 -24
  23. package/dist/userscripts/socialmediagirls.user.js +26 -22
  24. package/dist/userscripts/spankbang.user.js +62 -44
  25. package/dist/userscripts/thisvid.user.js +1269 -1366
  26. package/dist/userscripts/xhamster.user.js +119 -132
  27. package/dist/userscripts/xmegadrive.user.js +82 -0
  28. package/dist/userscripts/xvideos.user.js +115 -91
  29. package/package.json +10 -6
  30. package/src/core/data-handler/data-filter.ts +3 -3
  31. package/src/core/data-handler/data-manager.ts +11 -3
  32. package/src/core/parsers/pagination-parser/index.ts +0 -4
  33. package/src/core/parsers/pagination-parser/pagination-strategies/PaginationStrategyPathnameParams.ts +36 -1
  34. package/src/core/rules/index.ts +3 -3
  35. package/src/userscripts/index.ts +1 -1
  36. package/src/userscripts/meta.json +1 -1
  37. package/src/userscripts/scripts/3hentai.ts +1 -1
  38. package/src/userscripts/scripts/camgirlfinder.ts +1 -1
  39. package/src/userscripts/scripts/camwhores.ts +2 -2
  40. package/src/userscripts/scripts/e-hentai.ts +1 -1
  41. package/src/userscripts/scripts/ebalka.ts +2 -2
  42. package/src/userscripts/scripts/eporner.ts +41 -15
  43. package/src/userscripts/scripts/erome.ts +1 -1
  44. package/src/userscripts/scripts/eroprofile.ts +6 -6
  45. package/src/userscripts/scripts/javhdporn.ts +1 -1
  46. package/src/userscripts/scripts/missav.ts +1 -1
  47. package/src/userscripts/scripts/motherless.ts +28 -19
  48. package/src/userscripts/scripts/namethatporn.ts +1 -1
  49. package/src/userscripts/scripts/nhentai.ts +1 -1
  50. package/src/userscripts/scripts/obmenvsem.ts +1 -1
  51. package/src/userscripts/scripts/pornhub.ts +4 -2
  52. package/src/userscripts/scripts/simpcity.ts +72 -5
  53. package/src/userscripts/scripts/{socialmediagirls copy.ts → socialmediagirls.ts} +1 -1
  54. package/src/userscripts/scripts/spankbang.ts +20 -4
  55. package/src/userscripts/scripts/thisvid.ts +8 -21
  56. package/src/userscripts/scripts/xhamster.ts +12 -4
  57. package/src/userscripts/scripts/xmegadrive.ts +78 -0
  58. package/src/userscripts/scripts/xvideos.ts +26 -7
  59. package/src/utils/fetch/index.ts +2 -0
  60. package/src/utils/objects/memoize.ts +1 -9
  61. package/dist/test/test.user.js +0 -10301
  62. package/dist/userscripts/socialmediagirls copy.user.js +0 -41
@@ -1,153 +1,140 @@
1
1
  // ==UserScript==
2
2
  // @name Xhamster PervertMonkey
3
3
  // @namespace pervertmonkey
4
- // @version 5.0.21
4
+ // @version 5.0.23
5
5
  // @author violent-orangutan
6
6
  // @description Infinite scroll [optional], Filter by Title, Duration and Watched/Unwatched. Sort by Duration and Views
7
7
  // @license MIT
8
8
  // @icon https://www.google.com/s2/favicons?sz=64&domain=xhamster.com
9
9
  // @homepage https://github.com/smartacephale/sleazy-fork#readme
10
10
  // @homepageURL https://sleazyfork.org/en/users/1253342-smartacephale
11
- // @source https://github.com/smartacephale
11
+ // @source https://github.com/smartacephale/sleazy-fork
12
12
  // @supportURL https://github.com/smartacephale/sleazy-fork/issues
13
13
  // @match https://*.xhamster.com/*
14
14
  // @match https://*.xhamster.*/*
15
15
  // @exclude https://*.xhamster.com/embed*
16
- // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.25/dist/core/pervertmonkey.core.umd.js
17
- // @require data:application/javascript,var core = window.pervertmonkey.core || pervertmonkey.core; var utils = core;
16
+ // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.27/dist/core/pervertmonkey.core.umd.js
18
17
  // @grant GM_addElement
19
18
  // @grant GM_addStyle
20
19
  // @grant unsafeWindow
21
20
  // @run-at document-idle
22
21
  // ==/UserScript==
23
22
 
24
- (function (core, utils) {
25
- 'use strict';
23
+ var ___core = window.pervertmonkey.core || pervertmonkey.core;
24
+ var ___utils = ___core;
26
25
 
27
- var _GM_addElement = (() => typeof GM_addElement != "undefined" ? GM_addElement : undefined)();
28
- var _unsafeWindow = (() => typeof unsafeWindow != "undefined" ? unsafeWindow : undefined)();
29
26
 
30
- const IS_VIDEO_PAGE = /^\/videos|moments\//.test(location.pathname);
31
- const IS_PLAYLIST = /^\/my\/favorites\/videos\/\w+/.test(location.pathname);
32
- function createThumb(data) {
33
- const attrsToReplace = {
34
- href: data.pageURL,
35
- "data-previewvideo": data.trailerURL,
36
- "data-previewvideo-fallback": data.trailerFallbackUrl,
37
- "data-sprite": data.spriteURL,
38
- title: data.title,
39
- "data-video-id": data.id,
40
- srcset: data.thumbURL,
41
- src: data.imageURL
42
- };
43
- const text = {
44
- ".video-thumb-views": data.views,
45
- "[title]": data.title,
46
- '[data-role="video-duration"] div': data.duration
47
- };
48
- return utils.instantiateTemplate(".video-thumb", attrsToReplace, text);
49
- }
50
- const getPaginationData = !IS_PLAYLIST ? void 0 : async (url) => {
51
- const data = await utils.fetchJson(url);
52
- const thumbsHtml = data.list.map((e) => createThumb(e)).join("\n");
53
- return utils.parseHtml(`<div>${thumbsHtml}</div>`);
54
- };
55
- function createPlaylistPaginationStrategy() {
56
- const collectionId = location.pathname.split("/my/favorites/videos/")[1].split("-")[0];
57
- const data = _unsafeWindow.initials;
58
- const paginationLast = data.favoritesVideoPaging.maxPages;
59
- const paginationOffset = data.favoritesVideoPaging.active;
60
- const playlistPaginationStrategy = {
61
- paginationSelector: 'nav[class *= "pagination"]',
62
- getPaginationLast: () => paginationLast,
63
- getPaginationOffset: () => paginationOffset,
64
- getPaginationUrlGenerator: () => (offset) => {
65
- return `https://xhamster.com/api/front/favorite/get-playlist?id=${collectionId}&perPage=60&page=${offset}`;
66
- }
67
- };
68
- return playlistPaginationStrategy;
69
- }
70
- const paginationStrategyOptionsDefault = {
71
- paginationSelector: ".prev-next-list, .test-pager"
72
- };
73
- const paginationStrategyOptions = IS_PLAYLIST ? createPlaylistPaginationStrategy() : paginationStrategyOptionsDefault;
74
- const rules = new core.Rules({
75
- paginationStrategyOptions,
76
- getPaginationData,
77
- containerSelectorLast: ".thumb-list",
78
- thumbs: { selector: ".video-thumb" },
79
- thumb: {
80
- selectors: {
81
- title: ".video-thumb-info__name,.video-thumb-info>a",
82
- duration: ".thumb-image-container__duration",
83
- watched: { selector: '[data-role="video-watched', type: "boolean" },
84
- views: { selector: ".video-thumb-views", type: "float" }
85
- }
86
- },
87
- thumbImg: {
88
- strategy: "auto",
89
- remove: "[loading]"
90
- },
91
- gropeStrategy: "all-in-all",
92
- customDataFilterFns: [
93
- {
94
- filterWatched: (e, state) => !!(state.filterWatched && e.watched)
95
- },
96
- {
97
- filterUnwatched: (e, state) => !!(state.filterUnwatched && !e.watched)
98
- }
99
- ],
100
- schemeOptions: [
101
- "Title Filter",
102
- {
103
- title: "Filter Watched",
104
- content: [
105
- { filterWatched: false, label: "watched" },
106
- { filterUnwatched: false, label: "unwatched" }
107
- ]
108
- },
109
- "Sort By",
110
- "Duration Filter",
111
- "Badge",
112
- "Advanced"
113
- ],
114
- animatePreview
115
- });
116
- function animatePreview() {
117
- function createPreviewVideoElement(src, mount) {
118
- const video = _GM_addElement("video", {
119
- playsInline: true,
120
- autoplay: true,
121
- loop: true,
122
- class: "thumb-image-container__video",
123
- src
124
- });
125
- video.addEventListener(
126
- "loadeddata",
127
- () => {
128
- mount.before(video);
129
- },
130
- false
131
- );
132
- return () => utils.exterminateVideo(video);
133
- }
134
- utils.OnHover.create(document.body, ".video-thumb", (e) => {
135
- const container = e.querySelector(".thumb-image-container__image");
136
- const videoSrc = e.querySelector("[data-previewvideo]")?.getAttribute("data-previewvideo");
137
- return createPreviewVideoElement(videoSrc, container);
138
- });
139
- }
140
- function expandMoreVideoPage() {
141
- utils.watchElementChildrenCount(rules.container, () => setTimeout(rules.gropeInit, 1800));
142
- utils.waitForElementToAppear(document.body, 'button[data-role="show-more-next"]', (e) => {
143
- const observer = new utils.Observer((target) => {
144
- target.click();
145
- });
146
- observer.observe(e);
147
- });
148
- }
149
- if (IS_VIDEO_PAGE) {
150
- expandMoreVideoPage();
151
- }
152
-
153
- })(core, utils);
27
+ (function(___core, ___utils) {
28
+ "use strict";
29
+ var _GM_addElement = (() => typeof GM_addElement != "undefined" ? GM_addElement : void 0)();
30
+ var _unsafeWindow = (() => typeof unsafeWindow != "undefined" ? unsafeWindow : void 0)();
31
+ var IS_VIDEO_PAGE = /^\/videos|moments\//.test(location.pathname);
32
+ var IS_PLAYLIST = /^\/my\/favorites\/videos\/\w+/.test(location.pathname);
33
+ function createThumb(data) {
34
+ return (0, ___utils.instantiateTemplate)(".video-thumb", {
35
+ href: data.pageURL,
36
+ "data-previewvideo": data.trailerURL,
37
+ "data-previewvideo-fallback": data.trailerFallbackUrl,
38
+ "data-sprite": data.spriteURL,
39
+ title: data.title,
40
+ "data-video-id": data.id,
41
+ srcset: data.thumbURL,
42
+ src: data.imageURL
43
+ }, {
44
+ ".video-thumb-views": data.views,
45
+ "[title]": data.title,
46
+ "[data-role=\"video-duration\"] div": data.duration
47
+ });
48
+ }
49
+ var getPaginationData = !IS_PLAYLIST ? void 0 : async (url) => {
50
+ return (0, ___utils.parseHtml)(`<div>${(await (0, ___utils.fetchJson)(url)).list.map((e) => createThumb(e)).join("\n")}</div>`);
51
+ };
52
+ function createPlaylistPaginationStrategy() {
53
+ const collectionId = location.pathname.split("/my/favorites/videos/")[1].split("-")[0];
54
+ const data = _unsafeWindow.initials;
55
+ const paginationLast = data.favoritesVideoPaging.maxPages;
56
+ const paginationOffset = data.favoritesVideoPaging.active;
57
+ return {
58
+ paginationSelector: "nav[class *= \"pagination\"]",
59
+ getPaginationLast: () => paginationLast,
60
+ getPaginationOffset: () => paginationOffset,
61
+ getPaginationUrlGenerator: () => (offset) => {
62
+ return `https://xhamster.com/api/front/favorite/get-playlist?id=${collectionId}&perPage=60&page=${offset}`;
63
+ }
64
+ };
65
+ }
66
+ var rules = new ___core.Rules({
67
+ paginationStrategyOptions: IS_PLAYLIST ? createPlaylistPaginationStrategy() : { paginationSelector: ".prev-next-list, .test-pager" },
68
+ getPaginationData,
69
+ containerSelectorLast: ".thumb-list",
70
+ thumbs: {
71
+ selector: ".video-thumb",
72
+ transform: (thumb) => {
73
+ if (thumb.querySelector("[class*=placeholder]")) console.log("has placeholder", thumb);
74
+ return thumb;
75
+ }
76
+ },
77
+ thumb: { selectors: {
78
+ title: ".video-thumb-info__name,.video-thumb-info>a",
79
+ duration: ".thumb-image-container__duration",
80
+ watched: {
81
+ selector: "[data-role=\"video-watched",
82
+ type: "boolean"
83
+ },
84
+ views: {
85
+ selector: ".video-thumb-views",
86
+ type: "float"
87
+ }
88
+ } },
89
+ thumbImg: { strategy: "auto" },
90
+ gropeStrategy: "all-in-all",
91
+ customDataFilterFns: [{ filterWatched: (e, state) => !!(state.filterWatched && e.watched) }, { filterUnwatched: (e, state) => !!(state.filterUnwatched && !e.watched) }],
92
+ schemeOptions: [
93
+ "Title Filter",
94
+ {
95
+ title: "Filter Watched",
96
+ content: [{
97
+ filterWatched: false,
98
+ label: "watched"
99
+ }, {
100
+ filterUnwatched: false,
101
+ label: "unwatched"
102
+ }]
103
+ },
104
+ "Sort By",
105
+ "Duration Filter",
106
+ "Badge",
107
+ "Advanced"
108
+ ],
109
+ animatePreview
110
+ });
111
+ function animatePreview() {
112
+ function createPreviewVideoElement(src, mount) {
113
+ const video = _GM_addElement("video", {
114
+ playsInline: true,
115
+ autoplay: true,
116
+ loop: true,
117
+ class: "thumb-image-container__video",
118
+ src
119
+ });
120
+ video.addEventListener("loadeddata", () => {
121
+ mount.before(video);
122
+ }, false);
123
+ return () => (0, ___utils.exterminateVideo)(video);
124
+ }
125
+ ___utils.OnHover.create(document.body, ".video-thumb", (e) => {
126
+ const container = e.querySelector(".thumb-image-container__image");
127
+ const videoSrc = e.querySelector("[data-previewvideo]")?.getAttribute("data-previewvideo");
128
+ return createPreviewVideoElement(videoSrc, container);
129
+ });
130
+ }
131
+ function expandMoreVideoPage() {
132
+ (0, ___utils.watchElementChildrenCount)(rules.container, () => setTimeout(rules.gropeInit, 1800));
133
+ (0, ___utils.waitForElementToAppear)(document.body, "button[data-role=\"show-more-next\"]", (e) => {
134
+ new ___utils.Observer((target) => {
135
+ target.click();
136
+ }).observe(e);
137
+ });
138
+ }
139
+ if (IS_VIDEO_PAGE) expandMoreVideoPage();
140
+ })(___core, ___utils);
@@ -0,0 +1,82 @@
1
+ // ==UserScript==
2
+ // @name xmegadrive PervertMonkey
3
+ // @namespace pervertmonkey
4
+ // @version 1.0.0
5
+ // @author violent-orangutan
6
+ // @description Infinite scroll [optional]. Filter by Title and Duration. Sort by Duration and Views.
7
+ // @license MIT
8
+ // @icon https://www.google.com/s2/favicons?sz=64&domain=xmegadrive.com
9
+ // @homepage https://github.com/smartacephale/sleazy-fork#readme
10
+ // @homepageURL https://sleazyfork.org/en/users/1253342-smartacephale
11
+ // @source https://github.com/smartacephale/sleazy-fork
12
+ // @supportURL https://github.com/smartacephale/sleazy-fork/issues
13
+ // @match https://*.xmegadrive.com/*
14
+ // @exclude https://*.xmegadrive.com/*mode=async*
15
+ // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.27/dist/core/pervertmonkey.core.umd.js
16
+ // @grant GM_addStyle
17
+ // @grant unsafeWindow
18
+ // @run-at document-idle
19
+ // ==/UserScript==
20
+
21
+ var ___core = window.pervertmonkey.core || pervertmonkey.core;
22
+ var ___utils = ___core;
23
+
24
+
25
+ (function(___core, ___utils) {
26
+ "use strict";
27
+ var $ = (() => typeof unsafeWindow != "undefined" ? unsafeWindow : void 0)().$;
28
+ new ___core.Rules({
29
+ containerSelector: "[id*=\"playlist\"]:has(> .item .title),[id*=\"videos\"]:has(> .item .title),form:has(>.item .title)",
30
+ paginationStrategyOptions: { paginationSelector: ".pagination:not([id *= member])" },
31
+ thumbs: { selector: ".list-videos .item, .playlist .item, .list-playlists > div > .item, .item:has(.title)" },
32
+ thumb: {
33
+ strategy: "auto-select",
34
+ selectors: {
35
+ private: {
36
+ type: "boolean",
37
+ selector: "[class*=private]"
38
+ },
39
+ views: {
40
+ selector: ".views",
41
+ type: "float"
42
+ }
43
+ }
44
+ },
45
+ dataManagerOptions: { removeDuplicates: true },
46
+ thumbImg: { selector: "data-original" },
47
+ gropeStrategy: "all-in-all",
48
+ schemeOptions: [
49
+ "Title Filter",
50
+ "Duration Filter",
51
+ "Sort By",
52
+ "Badge",
53
+ "Advanced"
54
+ ],
55
+ animatePreview
56
+ });
57
+ function animatePreview(container) {
58
+ const tick = new ___utils.Tick(500);
59
+ function killjquery(n = 10) {
60
+ if (n > 0) {
61
+ n--;
62
+ $("img[data-cnt]").off();
63
+ setTimeout(() => killjquery(n), 250);
64
+ }
65
+ }
66
+ killjquery();
67
+ function rotateImg(src, count) {
68
+ return src.replace(/(\d)(?=\.jpg$)/, (_, n) => `${(0, ___utils.circularShift)(parseInt(n), count)}`);
69
+ }
70
+ ___utils.OnHover.create(container, ".list-videos .item, .playlist .item, .list-playlists > div > .item, .item:has(.title)", (e) => {
71
+ const img = e.querySelector("img");
72
+ const origin = img.src;
73
+ const count = parseInt(img.getAttribute("data-cnt")) || 5;
74
+ tick.start(() => {
75
+ img.src = rotateImg(img.src, count);
76
+ }, () => {
77
+ img.src = origin;
78
+ });
79
+ return () => tick.stop();
80
+ });
81
+ }
82
+ })(___core, ___utils);
@@ -1,112 +1,136 @@
1
1
  // ==UserScript==
2
2
  // @name XVideos PervertMonkey
3
3
  // @namespace pervertmonkey
4
- // @version 4.0.21
4
+ // @version 4.1.0
5
5
  // @author violent-orangutan
6
6
  // @description Infinite scroll [optional], Filter by Title, Uploader and Duration. Sort by Duration and Views.
7
7
  // @license MIT
8
8
  // @icon https://www.google.com/s2/favicons?sz=64&domain=xvideos.com
9
9
  // @homepage https://github.com/smartacephale/sleazy-fork#readme
10
10
  // @homepageURL https://sleazyfork.org/en/users/1253342-smartacephale
11
- // @source https://github.com/smartacephale
11
+ // @source https://github.com/smartacephale/sleazy-fork
12
12
  // @supportURL https://github.com/smartacephale/sleazy-fork/issues
13
13
  // @match https://*.xvideos.com/*
14
- // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.25/dist/core/pervertmonkey.core.umd.js
15
- // @require data:application/javascript,var core = window.pervertmonkey.core || pervertmonkey.core; var utils = core;
14
+ // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.27/dist/core/pervertmonkey.core.umd.js
16
15
  // @grant GM_addStyle
17
16
  // @grant unsafeWindow
18
17
  // @run-at document-idle
19
18
  // ==/UserScript==
20
19
 
21
- (function (core, utils) {
22
- 'use strict';
20
+ var ___core = window.pervertmonkey.core || pervertmonkey.core;
21
+ var ___utils = ___core;
23
22
 
24
- var _unsafeWindow = (() => typeof unsafeWindow != "undefined" ? unsafeWindow : undefined)();
25
23
 
26
- const xv = _unsafeWindow.xv;
27
- new core.Rules({
28
- paginationStrategyOptions: {
29
- paginationSelector: "#main .pagination:last-child",
30
- searchParamSelector: "p"
31
- },
32
- containerSelector: "*:has(>div.thumb-block[id^=video_]:not(.thumb-ad))",
33
- thumbs: { selector: "div.thumb-block[id^=video_]:not(.thumb-ad)" },
34
- thumb: {
35
- selectors: {
36
- title: "[class*=title]",
37
- uploader: "[class*=name]",
38
- duration: "[class*=duration]",
39
- views: { selector: ".metadata a ~ span", type: "float" },
40
- quality: { selector: ".video-hd-mark", type: "string" }
41
- },
42
- callback: (thumb) => {
43
- setTimeout(() => {
44
- const id = parseInt(thumb.getAttribute("data-id"));
45
- xv.thumbs.prepareVideo(id);
46
- }, 200);
47
- }
48
- },
49
- customDataFilterFns: [
50
- { qualityLow: (e, state) => !!state.qualityLow && e.quality !== "" },
51
- { quality360: (e, state) => !!state.quality360 && e.quality !== "360p" },
52
- { quality720: (e, state) => !!state.quality720 && e.quality !== "720p" },
53
- { quality1080: (e, state) => !!state.quality1080 && e.quality !== "1080p" },
54
- { quality1440: (e, state) => !!state.quality1440 && e.quality !== "1440p" },
55
- { quality4k: (e, state) => !!state.quality4k && e.quality !== "4k" }
56
- ],
57
- schemeOptions: [
58
- "Title Filter",
59
- "Uploader Filter",
60
- "Duration Filter",
61
- {
62
- title: "Quality Filter",
63
- content: [
64
- { qualityLow: false, label: "Low" },
65
- { quality360: false, label: "360p" },
66
- { quality720: false, label: "720p" },
67
- { quality1080: false, label: "1080p" },
68
- { quality1440: false, label: "1440p" },
69
- { quality4k: false, label: "4k" }
70
- ]
71
- },
72
- "Sort By",
73
- "Badge",
74
- "Advanced"
75
- ],
76
- animatePreview
77
- });
78
- function animatePreview(container) {
79
- function createPreviewElement(src, mount) {
80
- const elem = utils.parseHtml(`
24
+ (function(___core, ___utils) {
25
+ "use strict";
26
+ var xv = (() => typeof unsafeWindow != "undefined" ? unsafeWindow : void 0)().xv;
27
+ new ___core.Rules({
28
+ paginationStrategyOptions: {
29
+ paginationSelector: "#main .pagination:last-child",
30
+ searchParamSelector: "p"
31
+ },
32
+ containerSelector: "*:has(>div.thumb-block[id^=video_]:not(.thumb-ad))",
33
+ thumbs: { selector: "div.thumb-block[id^=video_]:not(.thumb-ad)" },
34
+ thumb: {
35
+ selectors: {
36
+ title: "[class*=title]",
37
+ uploader: "[class*=name]",
38
+ duration: "[class*=duration]",
39
+ views: {
40
+ selector: ".metadata a ~ span",
41
+ type: "float"
42
+ },
43
+ quality: {
44
+ selector: ".video-hd-mark",
45
+ type: "string"
46
+ }
47
+ },
48
+ callback: (thumb) => {
49
+ setTimeout(() => {
50
+ const id = parseInt(thumb.getAttribute("data-id"));
51
+ xv.thumbs.prepareVideo(id);
52
+ }, 200);
53
+ }
54
+ },
55
+ customDataFilterFns: [{ qualityFilter: {
56
+ handle(el, state) {
57
+ if (!(state.qualityLow || state.quality360 || state.quality720 || state.quality1080 || state.quality1440 || state.quality4k)) return false;
58
+ return !(state.qualityLow && el.quality === "" || state.quality360 && el.quality === "360p" || state.quality720 && el.quality === "720p" || state.quality1080 && el.quality === "1080p" || state.quality1440 && el.quality === "1440p" || state.quality4k && el.quality === "4k");
59
+ },
60
+ deps: [
61
+ "qualityLow",
62
+ "quality360",
63
+ "quality720",
64
+ "quality1080",
65
+ "quality1440",
66
+ "quality4k"
67
+ ]
68
+ } }],
69
+ schemeOptions: [
70
+ "Title Filter",
71
+ "Uploader Filter",
72
+ "Duration Filter",
73
+ {
74
+ title: "Quality Filter",
75
+ content: [
76
+ {
77
+ qualityLow: false,
78
+ label: "Low"
79
+ },
80
+ {
81
+ quality360: false,
82
+ label: "360p"
83
+ },
84
+ {
85
+ quality720: false,
86
+ label: "720p"
87
+ },
88
+ {
89
+ quality1080: false,
90
+ label: "1080p"
91
+ },
92
+ {
93
+ quality1440: false,
94
+ label: "1440p"
95
+ },
96
+ {
97
+ quality4k: false,
98
+ label: "4k"
99
+ }
100
+ ]
101
+ },
102
+ "Sort By",
103
+ "Badge",
104
+ "Advanced"
105
+ ],
106
+ animatePreview
107
+ });
108
+ function animatePreview(container) {
109
+ function createPreviewElement(src, mount) {
110
+ const elem = (0, ___utils.parseHtml)(`
81
111
  <div class="videopv" style="display: none;">
82
112
  <video autoplay="autoplay" playsinline="playsinline" muted="muted"></video>
83
113
  </div>`);
84
- mount.after(elem);
85
- const video = elem.querySelector("video");
86
- video.src = src;
87
- video.addEventListener(
88
- "loadeddata",
89
- () => {
90
- mount.style.opacity = "0";
91
- elem.style.display = "block";
92
- elem.style.background = "#000";
93
- },
94
- false
95
- );
96
- return () => {
97
- utils.exterminateVideo(video);
98
- elem.remove();
99
- mount.style.opacity = "1";
100
- };
101
- }
102
- function getVideoURL(src) {
103
- return src.replace(/\w+\.\w+$/, () => "preview.mp4");
104
- }
105
- utils.OnHover.create(container, "div.thumb-block[id^=video_]:not(.thumb-ad)", (target) => {
106
- const img = target.querySelector("img");
107
- const videoSrc = getVideoURL(img.src);
108
- return createPreviewElement(videoSrc, img);
109
- });
110
- }
111
-
112
- })(core, utils);
114
+ mount.after(elem);
115
+ const video = elem.querySelector("video");
116
+ video.src = src;
117
+ video.addEventListener("loadeddata", () => {
118
+ mount.style.opacity = "0";
119
+ elem.style.display = "block";
120
+ elem.style.background = "#000";
121
+ }, false);
122
+ return () => {
123
+ (0, ___utils.exterminateVideo)(video);
124
+ elem.remove();
125
+ mount.style.opacity = "1";
126
+ };
127
+ }
128
+ function getVideoURL(src) {
129
+ return src.replace(/\w+\.\w+$/, () => "preview.mp4");
130
+ }
131
+ ___utils.OnHover.create(container, "div.thumb-block[id^=video_]:not(.thumb-ad)", (target) => {
132
+ const img = target.querySelector("img");
133
+ return createPreviewElement(getVideoURL(img.src), img);
134
+ });
135
+ }
136
+ })(___core, ___utils);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pervert-monkey",
3
3
  "description": "daddy told us not to be ashamed of our userscripts",
4
- "version": "1.0.25",
4
+ "version": "1.0.27",
5
5
  "license": "MIT",
6
6
  "keywords": [
7
7
  "userscript",
@@ -12,7 +12,10 @@
12
12
  "author": "ViolentOrangutan atm.mormon@protonmail.com (https://github.com/smartacephale)",
13
13
  "homepage": "https://github.com/smartacephale/sleazy-fork#readme",
14
14
  "type": "module",
15
- "repository": "github:smartacephale/sleazy-fork",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/smartacephale/sleazy-fork.git"
18
+ },
16
19
  "bugs": {
17
20
  "url": "https://github.com/smartacephale/sleazy-fork/issues",
18
21
  "email": "atm.mormon@protonmail.com"
@@ -42,16 +45,17 @@
42
45
  },
43
46
  "devDependencies": {
44
47
  "@types/node": "^25.2.3",
48
+ "@typescript/typescript6": "^6.0.2",
45
49
  "jabroni-outfit": "^2.1.4",
46
- "typescript": "^5.9.3",
47
- "vite": "^6.4.1",
48
- "vite-plugin-dts": "^4.5.4"
50
+ "typescript": "^7.0.2",
51
+ "vite": "^8.1.5",
52
+ "vite-plugin-dts": "^5.0.3"
49
53
  },
50
54
  "dependencies": {
51
55
  "ix": "^7.0.0",
52
56
  "lskdb": "^1.0.2",
53
57
  "rxjs": "^7.8.2",
54
58
  "urlpattern-polyfill": "^10.1.0",
55
- "vite-plugin-monkey": "^7.1.9"
59
+ "vite-plugin-monkey": "^8.1.0"
56
60
  }
57
61
  }
@@ -20,11 +20,11 @@ export class DataFilter {
20
20
  return e.className.includes(DataFilterFn.prefix);
21
21
  }
22
22
 
23
- public createCssFilters(wrapper?: (cssRule: string) => string) {
23
+ public createCssFilters() {
24
24
  this.filters.forEach((_, name) => {
25
25
  const className = DataFilterFn.setPrefix(name);
26
- const cssRule = `.${className} { display: none !important; }`;
27
- GM_addStyle(wrapper ? wrapper(cssRule) : cssRule);
26
+ const cssRule = `@layer userscriptOverride { .${className} { display: none !important; } }`;
27
+ GM_addStyle(cssRule);
28
28
  });
29
29
  }
30
30