pervert-monkey 1.0.25 → 1.0.26

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 (58) 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 +8001 -9281
  4. package/dist/core/pervertmonkey.core.es.js.map +1 -1
  5. package/dist/core/pervertmonkey.core.umd.js +8829 -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 +26 -23
  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/xvideos.user.js +115 -91
  28. package/package.json +10 -6
  29. package/src/core/data-handler/data-filter.ts +4 -3
  30. package/src/core/parsers/pagination-parser/index.ts +0 -4
  31. package/src/core/parsers/pagination-parser/pagination-strategies/PaginationStrategyPathnameParams.ts +36 -1
  32. package/src/userscripts/index.ts +1 -1
  33. package/src/userscripts/meta.json +1 -1
  34. package/src/userscripts/scripts/3hentai.ts +1 -1
  35. package/src/userscripts/scripts/camgirlfinder.ts +1 -1
  36. package/src/userscripts/scripts/camwhores.ts +2 -2
  37. package/src/userscripts/scripts/e-hentai.ts +1 -1
  38. package/src/userscripts/scripts/ebalka.ts +1 -1
  39. package/src/userscripts/scripts/eporner.ts +41 -15
  40. package/src/userscripts/scripts/erome.ts +1 -1
  41. package/src/userscripts/scripts/eroprofile.ts +6 -6
  42. package/src/userscripts/scripts/javhdporn.ts +1 -1
  43. package/src/userscripts/scripts/missav.ts +1 -1
  44. package/src/userscripts/scripts/motherless.ts +28 -19
  45. package/src/userscripts/scripts/namethatporn.ts +1 -1
  46. package/src/userscripts/scripts/nhentai.ts +1 -1
  47. package/src/userscripts/scripts/obmenvsem.ts +1 -1
  48. package/src/userscripts/scripts/pornhub.ts +1 -1
  49. package/src/userscripts/scripts/simpcity.ts +1 -1
  50. package/src/userscripts/scripts/{socialmediagirls copy.ts → socialmediagirls.ts} +1 -1
  51. package/src/userscripts/scripts/spankbang.ts +20 -4
  52. package/src/userscripts/scripts/thisvid.ts +8 -21
  53. package/src/userscripts/scripts/xhamster.ts +11 -3
  54. package/src/userscripts/scripts/xvideos.ts +26 -7
  55. package/src/utils/fetch/index.ts +2 -0
  56. package/src/utils/objects/memoize.ts +1 -9
  57. package/dist/test/test.user.js +0 -10301
  58. package/dist/userscripts/socialmediagirls copy.user.js +0 -41
@@ -1,47 +1,46 @@
1
1
  // ==UserScript==
2
2
  // @name Eroprofile PervertMonkey
3
3
  // @namespace pervertmonkey
4
- // @version 2.0.19
4
+ // @version 2.0.21
5
5
  // @author violent-orangutan
6
6
  // @description Infinite scroll [optional], Filter by Title and Duration, Sort by Duration
7
7
  // @license MIT
8
8
  // @icon https://www.google.com/s2/favicons?sz=64&domain=eroprofile.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://*.eroprofile.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.26/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) {
22
- 'use strict';
20
+ var ___core = window.pervertmonkey.core || pervertmonkey.core;
21
+ var ___utils = ___core;
23
22
 
24
- document.querySelector(".videoGrid")?.after(document.querySelector(".clB"));
25
- new core.Rules({
26
- paginationStrategyOptions: {
27
- paginationSelector: ".boxNav2",
28
- searchParamSelector: "pnum"
29
- },
30
- thumbs: { selector: ".video" },
31
- thumb: {
32
- selectors: {
33
- title: "[title]",
34
- duration: ".videoDur"
35
- }
36
- },
37
- containerSelector: ".videoGrid",
38
- schemeOptions: [
39
- "Title Filter",
40
- "Duration Filter",
41
- "Sort By Duration",
42
- "Badge",
43
- "Advanced"
44
- ]
45
- });
46
23
 
47
- })(core);
24
+ (function(___core) {
25
+ "use strict";
26
+ document.querySelector(".videoGrid")?.after(document.querySelector(".clB"));
27
+ new ___core.Rules({
28
+ paginationStrategyOptions: {
29
+ paginationSelector: ".page-nav",
30
+ searchParamSelector: "pnum"
31
+ },
32
+ thumbs: { selector: ".grid-tile-video" },
33
+ thumb: { selectors: {
34
+ title: ".title",
35
+ duration: ".duration"
36
+ } },
37
+ containerSelector: "div:has(>.grid-tile-video)",
38
+ schemeOptions: [
39
+ "Title Filter",
40
+ "Duration Filter",
41
+ "Sort By Duration",
42
+ "Badge",
43
+ "Advanced"
44
+ ]
45
+ });
46
+ })(___core);
@@ -1,41 +1,47 @@
1
1
  // ==UserScript==
2
2
  // @name Javhdporn PervertMonkey
3
3
  // @namespace pervertmonkey
4
- // @version 3.0.19
4
+ // @version 3.0.20
5
5
  // @author violent-orangutan
6
6
  // @description Infinite scroll [optional], Filter by Title and Duration, Sort By Duration and Views
7
7
  // @license MIT
8
8
  // @icon https://www.google.com/s2/favicons?sz=64&domain=javhdporn.net
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://*.javhdporn.net/*
14
14
  // @match https://*.javhdporn.*/*
15
- // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.25/dist/core/pervertmonkey.core.umd.js
16
- // @require data:application/javascript,var core = window.pervertmonkey.core || pervertmonkey.core; var utils = core;
15
+ // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.26/dist/core/pervertmonkey.core.umd.js
17
16
  // @grant GM_addStyle
18
17
  // @grant unsafeWindow
19
18
  // @run-at document-idle
20
19
  // ==/UserScript==
21
20
 
22
- (function (core) {
23
- 'use strict';
21
+ var ___core = window.pervertmonkey.core || pervertmonkey.core;
22
+ var ___utils = ___core;
24
23
 
25
- new core.Rules({
26
- containerSelector: "div:has(> article)",
27
- thumbs: { selector: "article.thumb-block" },
28
- thumb: {
29
- selectors: {
30
- title: "header.entry-header",
31
- duration: ".duration",
32
- views: { selector: ".views", type: "float" }
33
- }
34
- },
35
- paginationStrategyOptions: {
36
- pathnameSelector: /\/page\/(\d+)\/?$/
37
- },
38
- schemeOptions: ["Title Filter", "Duration Filter", "Sort By", "Badge", "Advanced"]
39
- });
40
24
 
41
- })(core);
25
+ (function(___core) {
26
+ "use strict";
27
+ new ___core.Rules({
28
+ containerSelector: "div:has(> article)",
29
+ thumbs: { selector: "article.thumb-block" },
30
+ thumb: { selectors: {
31
+ title: "header.entry-header",
32
+ duration: ".duration",
33
+ views: {
34
+ selector: ".views",
35
+ type: "float"
36
+ }
37
+ } },
38
+ paginationStrategyOptions: { pathnameSelector: /\/page\/(\d+)\/?$/ },
39
+ schemeOptions: [
40
+ "Title Filter",
41
+ "Duration Filter",
42
+ "Sort By",
43
+ "Badge",
44
+ "Advanced"
45
+ ]
46
+ });
47
+ })(___core);
@@ -1,45 +1,44 @@
1
1
  // ==UserScript==
2
2
  // @name Missav PervertMonkey
3
3
  // @namespace pervertmonkey
4
- // @version 3.0.18
4
+ // @version 3.0.19
5
5
  // @author violent-orangutan
6
6
  // @description Infinite scroll [optional], Filter by Title and Duration, Sort by Duration
7
7
  // @license MIT
8
8
  // @icon https://www.google.com/s2/favicons?sz=64&domain=missav123.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://*.missav123.com/*
14
14
  // @match https://*.missav.*/*
15
15
  // @match https://*.missav.ws/*
16
16
  // @match https://*.missav.to/*
17
17
  // @match https://*.missav.live/*
18
- // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.25/dist/core/pervertmonkey.core.umd.js
19
- // @require data:application/javascript,var core = window.pervertmonkey.core || pervertmonkey.core; var utils = core;
18
+ // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.26/dist/core/pervertmonkey.core.umd.js
20
19
  // @grant GM_addStyle
21
20
  // @grant unsafeWindow
22
21
  // @run-at document-idle
23
22
  // ==/UserScript==
24
23
 
25
- (function (core) {
26
- 'use strict';
24
+ var ___core = window.pervertmonkey.core || pervertmonkey.core;
25
+ var ___utils = ___core;
27
26
 
28
- new core.Rules({
29
- paginationStrategyOptions: {
30
- paginationSelector: "nav[x-data]"
31
- },
32
- containerSelector: ".grid[x-data]",
33
- thumbs: { selector: "div:has(> .thumbnail.group)" },
34
- thumb: { strategy: "auto-text" },
35
- thumbImg: { strategy: "auto" },
36
- schemeOptions: [
37
- "Title Filter",
38
- "Duration Filter",
39
- "Sort By Duration",
40
- "Badge",
41
- "Advanced"
42
- ]
43
- });
44
27
 
45
- })(core);
28
+ (function(___core) {
29
+ "use strict";
30
+ new ___core.Rules({
31
+ paginationStrategyOptions: { paginationSelector: "nav[x-data]" },
32
+ containerSelector: ".grid[x-data]",
33
+ thumbs: { selector: "div:has(> .thumbnail.group)" },
34
+ thumb: { strategy: "auto-text" },
35
+ thumbImg: { strategy: "auto" },
36
+ schemeOptions: [
37
+ "Title Filter",
38
+ "Duration Filter",
39
+ "Sort By Duration",
40
+ "Badge",
41
+ "Advanced"
42
+ ]
43
+ });
44
+ })(___core);
@@ -1,154 +1,149 @@
1
1
  // ==UserScript==
2
2
  // @name Motherless PervertMonkey
3
3
  // @namespace pervertmonkey
4
- // @version 5.0.20
4
+ // @version 5.0.25
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
- // @icon https://www.google.com/s2/favicons?sz=64&domain=motherless.com
8
+ // @icon https://www.google.com/s2/favicons?sz=64&domain=motherless.xxx
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
- // @match https://motherless.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;
13
+ // @match https://motherless.xxx/*
14
+ // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.26/dist/core/pervertmonkey.core.umd.js
16
15
  // @grant GM_addElement
17
16
  // @grant GM_addStyle
18
17
  // @grant unsafeWindow
19
18
  // @run-at document-idle
20
19
  // ==/UserScript==
21
20
 
22
- (function (core, utils) {
23
- 'use strict';
21
+ var ___core = window.pervertmonkey.core || pervertmonkey.core;
22
+ var ___utils = ___core;
24
23
 
25
- var _GM_addElement = (() => typeof GM_addElement != "undefined" ? GM_addElement : undefined)();
26
- var _GM_addStyle = (() => typeof GM_addStyle != "undefined" ? GM_addStyle : undefined)();
27
- var _unsafeWindow = (() => typeof unsafeWindow != "undefined" ? unsafeWindow : undefined)();
28
24
 
29
- _unsafeWindow.__is_premium = true;
30
- const $ = _unsafeWindow.$;
31
- const rules = new core.Rules({
32
- containerSelectorLast: ".content-inner",
33
- thumbs: { selector: ".thumb-container, .mobile-thumb" },
34
- thumb: {
35
- selectors: {
36
- uploader: ".uploader",
37
- title: ".title",
38
- duration: ".size",
39
- views: { selector: ".hits", type: "float" }
40
- }
41
- },
42
- thumbImg: { strategy: "auto" },
43
- paginationStrategyOptions: {
44
- paginationSelector: ".pagination_link, .ml-pagination"
45
- },
46
- animatePreview,
47
- gropeStrategy: "all-in-all",
48
- schemeOptions: [
49
- "Title Filter",
50
- "Uploader Filter",
51
- "Duration Filter",
52
- "Sort By",
53
- "Badge",
54
- {
55
- title: "Advanced",
56
- content: [
57
- { applyTitleFiltersToSearch: false, label: "apply title filters to search" }
58
- ]
59
- }
60
- ]
61
- });
62
- function animatePreview(_) {
63
- const tick = new utils.Tick(500);
64
- function onOver(target) {
65
- $(".video").off();
66
- const container = target.querySelector(".video");
67
- if (!container) return;
68
- const img = container.querySelector("img.static");
69
- const stripSrc = img.getAttribute("data-strip-src");
70
- container.classList.toggle("animating");
71
- let overlay = img.nextElementSibling;
72
- if (!overlay || overlay.tagName !== "DIV") {
73
- overlay = document.createElement("div");
74
- overlay.setAttribute(
75
- "style",
76
- "z-index: 8; position: absolute; top: 0; left: 0; pointer-events: none;"
77
- );
78
- img.after(overlay);
79
- }
80
- overlay.style.display = "block";
81
- let j = 0;
82
- const containerHeight = container.offsetHeight + 20;
83
- const w = img.offsetWidth;
84
- const h = img.offsetHeight;
85
- const widthRatio = Math.floor(1000.303 * w / 100);
86
- const heightRatio = Math.floor(228.6666 * h / 100);
87
- const verticalOffset = (containerHeight - h) / 2;
88
- tick.start(() => {
89
- Object.assign(overlay.style, {
90
- width: `${w}px`,
91
- height: `${containerHeight}px`,
92
- backgroundImage: `url('${stripSrc}')`,
93
- backgroundSize: `${widthRatio}px ${heightRatio}px`,
94
- backgroundPosition: `-${j++ * w % widthRatio}px ${verticalOffset}px`
95
- });
96
- });
97
- return () => {
98
- tick.stop();
99
- container.classList.toggle("animating");
100
- overlay.style.display = "none";
101
- };
102
- }
103
- utils.OnHover.create(document.body, ".thumb-container, .mobile-thumb", onOver);
104
- }
105
- function fixURLs() {
106
- document.querySelectorAll(".gallery-container").forEach((g) => {
107
- const x = g.innerText.match(/([\d|.]+)k? videos/gi)?.[0];
108
- const hasVideos = parseInt(x) > 0;
109
- const header = hasVideos ? "/GV" : "/GI";
110
- g.querySelectorAll("a").forEach((a) => {
111
- a.href = a.href.replace(/\/G/, () => header);
112
- });
113
- });
114
- document.querySelectorAll(
115
- 'a[href^="/term/"]:not([href^="/term/videos/"]):not(.pop):not([rel])'
116
- ).forEach((a) => {
117
- a.href = a.href.replace(/[\w|+]+$/, (v) => `videos/${v}?term=${v}`);
118
- });
119
- document.querySelectorAll('#media-groups-container a[href^="/g/"]').forEach((a) => {
120
- a.href = a.href.replace(/\/g\//, "/gv/");
121
- });
122
- }
123
- function mobileGalleryToDesktop(e) {
124
- e.querySelector(".clear-left")?.remove();
125
- const container = e.firstElementChild;
126
- container.appendChild(container.nextElementSibling);
127
- e.className = "thumb-container gallery-container";
128
- container.className = "desktop-thumb image medium";
129
- (container.firstElementChild?.nextElementSibling).className = "gallery-captions";
130
- utils.replaceElementTag(container.firstElementChild, "a");
131
- return e;
132
- }
133
- async function desktopAddMobGalleries() {
134
- const galleries = document.querySelector(".media-related-galleries");
135
- if (!galleries) return;
136
- const galleriesContainer = galleries.querySelector(".content-inner");
137
- const galleriesCount = galleries.querySelectorAll(".gallery-container").length;
138
- const mobDom = await utils.fetchWith(window.location.href, { type: "html", mobile: true });
139
- const mobGalleries = mobDom.querySelectorAll(
140
- ".ml-gallery-thumb"
141
- );
142
- for (const [i, x] of mobGalleries.entries()) {
143
- if (i > galleriesCount - 1) {
144
- galleriesContainer.append(mobileGalleryToDesktop(x));
145
- }
146
- }
147
- }
148
- const overwrite1 = (x) => `@media only screen and (max-width: 1280px) {
149
- #categories-page.inner ${x} }`;
150
- rules.dataManager.dataFilter.createCssFilters(overwrite1);
151
- _GM_addStyle(`
25
+ (function(___core, ___utils) {
26
+ "use strict";
27
+ var _GM_addElement = (() => typeof GM_addElement != "undefined" ? GM_addElement : void 0)();
28
+ var _GM_addStyle = (() => typeof GM_addStyle != "undefined" ? GM_addStyle : void 0)();
29
+ var _unsafeWindow = (() => typeof unsafeWindow != "undefined" ? unsafeWindow : void 0)();
30
+ _unsafeWindow.__is_premium = true;
31
+ var $ = _unsafeWindow.$;
32
+ var rules = new ___core.Rules({
33
+ containerSelector: ".content-inner",
34
+ thumbs: { selector: ".thumb-container, .mobile-thumb" },
35
+ thumb: { selectors: {
36
+ uploader: ".uploader",
37
+ title: ".title",
38
+ duration: ".size",
39
+ views: {
40
+ selector: ".hits",
41
+ type: "float"
42
+ }
43
+ } },
44
+ thumbImg: { strategy: "auto" },
45
+ paginationStrategyOptions: { paginationSelector: ".pagination_link, .ml-pagination" },
46
+ animatePreview,
47
+ gropeStrategy: "all-in-all",
48
+ schemeOptions: [
49
+ "Title Filter",
50
+ "Uploader Filter",
51
+ "Duration Filter",
52
+ "Sort By",
53
+ "Badge",
54
+ {
55
+ title: "Advanced",
56
+ content: [{
57
+ applyTitleFiltersToSearch: false,
58
+ label: "apply title filters to search"
59
+ }]
60
+ }
61
+ ]
62
+ });
63
+ function animatePreview(_) {
64
+ const tick = new ___utils.Tick(500);
65
+ function onOver(target) {
66
+ $(".video").off();
67
+ const container = target.querySelector(".video");
68
+ if (!container) return;
69
+ const img = container.querySelector("img.static");
70
+ const stripSrc = img.getAttribute("data-strip-src");
71
+ container.classList.toggle("animating");
72
+ let overlay = img.nextElementSibling;
73
+ if (!overlay || overlay.tagName !== "DIV") {
74
+ overlay = document.createElement("div");
75
+ overlay.setAttribute("style", "z-index: 8; position: absolute; top: 0; left: 0; pointer-events: none;");
76
+ img.after(overlay);
77
+ }
78
+ overlay.style.display = "block";
79
+ let j = 0;
80
+ const containerHeight = container.offsetHeight + 20;
81
+ const w = img.offsetWidth;
82
+ const h = img.offsetHeight;
83
+ const widthRatio = Math.floor(1000.303 * w / 100);
84
+ const heightRatio = Math.floor(228.6666 * h / 100);
85
+ const verticalOffset = (containerHeight - h) / 2;
86
+ tick.start(() => {
87
+ Object.assign(overlay.style, {
88
+ width: `${w}px`,
89
+ height: `${containerHeight}px`,
90
+ backgroundImage: `url('${stripSrc}')`,
91
+ backgroundSize: `${widthRatio}px ${heightRatio}px`,
92
+ backgroundPosition: `-${j++ * w % widthRatio}px ${verticalOffset}px`
93
+ });
94
+ });
95
+ return () => {
96
+ tick.stop();
97
+ container.classList.toggle("animating");
98
+ overlay.style.display = "none";
99
+ };
100
+ }
101
+ ___utils.OnHover.create(document.body, ".thumb-container, .mobile-thumb", onOver);
102
+ }
103
+ function fixURLs() {
104
+ document.querySelectorAll(".gallery-container").forEach((g) => {
105
+ const x = g.innerText.match(/([\d|.]+)k? videos/gi)?.[0];
106
+ const header = parseInt(x) > 0 ? "/GV" : "/GI";
107
+ g.querySelectorAll("a").forEach((a) => {
108
+ a.href = a.href.replace(/\/G/, () => header);
109
+ });
110
+ });
111
+ document.querySelectorAll("a[href^=\"/term/\"]:not([href^=\"/term/videos/\"]):not(.pop):not([rel])").forEach((a) => {
112
+ a.href = a.href.replace(/[\w|+]+$/, (v) => `videos/${v}?term=${v}`);
113
+ });
114
+ document.querySelectorAll("#media-groups-container a[href^=\"/g/\"]").forEach((a) => {
115
+ a.href = a.href.replace(/\/g\//, "/gv/");
116
+ });
117
+ }
118
+ function mobileGalleryToDesktop(e) {
119
+ e.querySelector(".clear-left")?.remove();
120
+ const container = e.firstElementChild;
121
+ container.appendChild(container.nextElementSibling);
122
+ e.className = "thumb-container gallery-container";
123
+ container.className = "desktop-thumb image medium";
124
+ (container.firstElementChild?.nextElementSibling).className = "gallery-captions";
125
+ (0, ___utils.replaceElementTag)(container.firstElementChild, "a");
126
+ return e;
127
+ }
128
+ async function desktopAddMobGalleries() {
129
+ const galleries = document.querySelector(".media-related-galleries");
130
+ if (!galleries) return;
131
+ await new Promise((resolve) => {
132
+ (0, ___utils.waitForElementToAppear)(document, ".thumb-container.gallery-container", resolve);
133
+ });
134
+ const mobGalleries = (await (0, ___utils.fetchWith)(window.location.href, {
135
+ type: "html",
136
+ mobile: true
137
+ })).querySelectorAll(".ml-gallery-thumb");
138
+ const galleriesContainer = galleries.querySelector(".content-inner");
139
+ for (const x of mobGalleries.values()) {
140
+ const mobGallery = mobileGalleryToDesktop(x);
141
+ const mobGalleryId = mobGallery.querySelector("a").href.split("/").at(-1);
142
+ if (galleriesContainer.querySelector(`a[href*=${mobGalleryId}]`)) continue;
143
+ galleriesContainer.append(mobGallery);
144
+ }
145
+ }
146
+ _GM_addStyle(`
152
147
  .img-container, .desktop-thumb { min-height: 150px; max-height: 150px; }
153
148
 
154
149
  .group-minibio, .gallery-container { display: block !important; }
@@ -157,21 +152,15 @@
157
152
  .ml-masonry-images.masonry-columns-6 .content-inner { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
158
153
  .ml-masonry-images.masonry-columns-8 .content-inner { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); }
159
154
  `);
160
- document.querySelector(".ml-pagination")?.before(_GM_addElement("div", { class: "clear-left" }));
161
- function applySearchFilters() {
162
- let pathname = window.location.pathname;
163
- const wordsToFilter = rules.store.state.filterExcludeWords.match(/\w+/g) || [];
164
- wordsToFilter.filter((w) => !pathname.includes(w)).forEach((w) => {
165
- pathname += `+-${w.trim()}`;
166
- });
167
- if (wordsToFilter.some((w) => !window.location.href.includes(w))) {
168
- window.location.href = pathname;
169
- }
170
- }
171
- desktopAddMobGalleries().then(() => fixURLs());
172
- const IS_SEARCH = /^\/term\//.test(location.pathname);
173
- if (IS_SEARCH && rules.store.state.applyTitleFiltersToSearch) {
174
- applySearchFilters();
175
- }
176
-
177
- })(core, utils);
155
+ document.querySelector(".ml-pagination")?.before(_GM_addElement("div", { class: "clear-left" }));
156
+ function applySearchFilters() {
157
+ let pathname = window.location.pathname;
158
+ const wordsToFilter = rules.store.state.filterExcludeWords.match(/\w+/g) || [];
159
+ wordsToFilter.filter((w) => !pathname.includes(w)).forEach((w) => {
160
+ pathname += `+-${w.trim()}`;
161
+ });
162
+ if (wordsToFilter.some((w) => !window.location.href.includes(w))) window.location.href = pathname;
163
+ }
164
+ desktopAddMobGalleries().then(() => fixURLs());
165
+ if (/^\/term\//.test(location.pathname) && rules.store.state.applyTitleFiltersToSearch) applySearchFilters();
166
+ })(___core, ___utils);