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,76 +1,67 @@
1
1
  // ==UserScript==
2
2
  // @name NameThatPorn 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, Uploader and Solved/Unsolved
7
7
  // @license MIT
8
8
  // @icon https://www.google.com/s2/favicons?sz=64&domain=namethatporn.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://namethatporn.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) {
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
- new core.Rules({
27
- thumbs: { selector: ".item, .nsw_r_w" },
28
- containerSelector: "#items_wrapper, #nsw_r",
29
- thumb: {
30
- selectors: {
31
- title: ".item_title, .nsw_r_tit",
32
- uploader: ".item_answer b, .nsw_r_desc",
33
- solved: { selector: ".item_solved, .nsw_r_slvd", type: "boolean" }
34
- }
35
- },
36
- thumbImg: {
37
- selector: (img) => img.getAttribute("data-dyn")?.concat(".webp") || img.getAttribute("src")
38
- },
39
- paginationStrategyOptions: {
40
- paginationSelector: "#smi_wrp, #nsw_p"
41
- },
42
- gropeStrategy: "all-in-all",
43
- customDataFilterFns: [
44
- {
45
- filterSolved: (e, state) => state.filterSolved && e.solved
46
- },
47
- {
48
- filterUnsolved: (e, state) => state.filterUnsolved && !e.solved
49
- }
50
- ],
51
- schemeOptions: [
52
- "Title Filter",
53
- "Uploader Filter",
54
- {
55
- title: "Filter Status",
56
- content: [
57
- { filterSolved: false, label: "solved" },
58
- { filterUnsolved: false, label: "unsolved" }
59
- ]
60
- },
61
- "Badge",
62
- "Advanced"
63
- ]
64
- });
65
- _unsafeWindow.confirm = () => true;
66
- function handleKeys(event) {
67
- if (event.key === "c") {
68
- const name = document.querySelector("#loggedin_box_new_username")?.innerText;
69
- if (!document.querySelector(`.ida_confirm_usernames a[href$="${name}.html"]`)) {
70
- document.querySelector(".id_answer_buttons > .iab.iac")?.click();
71
- }
72
- }
73
- }
74
- _unsafeWindow.addEventListener("keydown", handleKeys, { once: true });
75
-
76
- })(core);
24
+ (function(___core) {
25
+ "use strict";
26
+ var _unsafeWindow = (() => typeof unsafeWindow != "undefined" ? unsafeWindow : void 0)();
27
+ new ___core.Rules({
28
+ thumbs: { selector: ".item, .nsw_r_w" },
29
+ containerSelector: "#items_wrapper, #nsw_r",
30
+ thumb: { selectors: {
31
+ title: ".item_title, .nsw_r_tit",
32
+ uploader: ".item_answer b, .nsw_r_desc",
33
+ solved: {
34
+ selector: ".item_solved, .nsw_r_slvd",
35
+ type: "boolean"
36
+ }
37
+ } },
38
+ thumbImg: { selector: (img) => img.getAttribute("data-dyn")?.concat(".webp") || img.getAttribute("src") },
39
+ paginationStrategyOptions: { paginationSelector: "#smi_wrp, #nsw_p" },
40
+ gropeStrategy: "all-in-all",
41
+ customDataFilterFns: [{ filterSolved: (e, state) => state.filterSolved && e.solved }, { filterUnsolved: (e, state) => state.filterUnsolved && !e.solved }],
42
+ schemeOptions: [
43
+ "Title Filter",
44
+ "Uploader Filter",
45
+ {
46
+ title: "Filter Status",
47
+ content: [{
48
+ filterSolved: false,
49
+ label: "solved"
50
+ }, {
51
+ filterUnsolved: false,
52
+ label: "unsolved"
53
+ }]
54
+ },
55
+ "Badge",
56
+ "Advanced"
57
+ ]
58
+ });
59
+ _unsafeWindow.confirm = () => true;
60
+ function handleKeys(event) {
61
+ if (event.key === "c") {
62
+ const name = document.querySelector("#loggedin_box_new_username")?.innerText;
63
+ if (!document.querySelector(`.ida_confirm_usernames a[href$="${name}.html"]`)) document.querySelector(".id_answer_buttons > .iab.iac")?.click();
64
+ }
65
+ }
66
+ _unsafeWindow.addEventListener("keydown", handleKeys, { once: true });
67
+ })(___core);
@@ -1,118 +1,123 @@
1
1
  // ==UserScript==
2
2
  // @name NHentai PervertMonkey
3
3
  // @namespace pervertmonkey
4
- // @version 4.0.19
4
+ // @version 4.0.20
5
5
  // @author violent-orangutan
6
6
  // @description Infinite scroll [optional], Filter by Title
7
7
  // @license MIT
8
8
  // @icon https://www.google.com/s2/favicons?sz=64&domain=nhentai.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://*.nhentai.net/*
14
14
  // @match https://*.nhentai.*/*
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.27/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, utils) {
23
- 'use strict';
21
+ var ___core = window.pervertmonkey.core || pervertmonkey.core;
22
+ var ___utils = ___core;
24
23
 
25
- const IS_TITLE_PAGE = /^\/g\/\d+/.test(location.pathname);
26
- const IS_SEARCH_PAGE = /^\/search\//.test(location.pathname);
27
- const nhentaiRules = new core.Rules({
28
- thumbs: { selector: ".gallery" },
29
- thumb: { selectors: { title: ".caption" } },
30
- thumbImg: { strategy: "auto", remove: "auto" },
31
- containerSelectorLast: ".index-container, .container",
32
- schemeOptions: ["Title Filter", "Badge", "Advanced"],
33
- gropeStrategy: "all-in-all"
34
- });
35
- const filterDescriptors = {
36
- english: { query: "english", name: "🇬🇧" },
37
- japanese: { query: "japanese", name: "🇯🇵" },
38
- chinese: { query: "chinese", name: "🇨🇳" },
39
- gay: { query: "-gay", name: "Exclude Gay" },
40
- fullColor: { query: "color", name: "Full Color" }
41
- };
42
- function checkURL(url_) {
43
- return Object.keys(filterDescriptors).reduce((url, k) => {
44
- const q = filterDescriptors[k].query;
45
- return nhentaiRules.store.state.custom[k] ? url.includes(q) ? url : `${url}+${q}` : url.replace(`+${q}`, () => "");
46
- }, url_);
47
- }
48
- function filtersUI() {
49
- const state = nhentaiRules.store.state;
50
- const btnContainer = Array.from(document.querySelectorAll(".sort-type")).pop();
51
- const descs = Array.from(Object.keys(filterDescriptors));
52
- [descs.slice(0, 3), [descs[3]], [descs[4]]].forEach((groupOfButtons) => {
53
- const btns = utils.parseHtml(`<div class="sort-type"></div>`);
54
- groupOfButtons.forEach((k) => {
55
- const btn = utils.parseHtml(
56
- `<a href="#" ${state.custom[k] ? 'style="background: rgba(59, 49, 70, 1)"' : ""}>${filterDescriptors[k].name}</a>`
57
- );
58
- btn.addEventListener("click", (e) => {
59
- e.preventDefault();
60
- state.custom[k] = !state.custom[k];
61
- location.href = checkURL(location.href);
62
- });
63
- btns.append(btn);
64
- });
65
- btnContainer?.after(btns);
66
- });
67
- const fixedURL = checkURL(location.href);
68
- if (location.href !== fixedURL) location.href = checkURL(location.href);
69
- }
70
- function findSimilar() {
71
- let tags = Array.from(
72
- document.querySelectorAll('.tags .tag[href^="/tag/"] .name')
73
- ).map((tag) => tag.innerText).join(" ").split(" ");
74
- tags = Array.from(new Set(tags)).sort((a, b) => a.length - b.length);
75
- const urls = {
76
- searchSimilar: `/search/?q=${tags.slice(0, 5).join("+")}`,
77
- searchSimilarLess: `/search/?q=${tags.reverse().slice(0, 5).join("+")}`
78
- };
79
- Object.keys(urls).forEach((url) => {
80
- urls[url] = checkURL(urls[url]);
81
- });
82
- Array.from(document.links).filter(
83
- (l) => /\/(search|category|tag|character|artist|group|parody)\/\w+/.test(l.href)
84
- ).forEach((l) => {
85
- l.href = checkURL(
86
- l.href.replace(/(search|category|tag|character|artist|group|parody)\//, "search/?q=").replace(/\/$/, "")
87
- );
88
- });
89
- document.querySelector(".buttons")?.append(
90
- utils.parseHtml(
91
- `<a href="${urls.searchSimilar}" class="btn" style="background: rgba(59, 49, 70, 1)"><i class="fa fa-search"></i> Similar</a>`
92
- ),
93
- utils.parseHtml(
94
- `<a href="${urls.searchSimilarLess}" class="btn" style="background: rgba(59, 49, 70, .9)"><i class="fa fa-search"></i> Less Similar</a>`
95
- )
96
- );
97
- }
98
- function route() {
99
- if (!nhentaiRules.store.state.custom) {
100
- const custom = Object.entries(filterDescriptors).reduce(
101
- (acc, [k, _]) => {
102
- acc[k] = false;
103
- return acc;
104
- },
105
- {}
106
- );
107
- Object.assign(nhentaiRules.store.state, { custom });
108
- }
109
- if (IS_TITLE_PAGE) {
110
- findSimilar();
111
- }
112
- if (IS_SEARCH_PAGE) {
113
- filtersUI();
114
- }
115
- }
116
- route();
117
24
 
118
- })(core, utils);
25
+ (function(___core, ___utils) {
26
+ "use strict";
27
+ var IS_TITLE_PAGE = /^\/g\/\d+/.test(location.pathname);
28
+ var IS_SEARCH_PAGE = /^\/search\//.test(location.pathname);
29
+ var nhentaiRules = new ___core.Rules({
30
+ thumbs: { selector: ".gallery" },
31
+ thumb: { selectors: { title: ".caption" } },
32
+ thumbImg: {
33
+ strategy: "auto",
34
+ remove: "auto"
35
+ },
36
+ containerSelectorLast: ".index-container, .container",
37
+ schemeOptions: [
38
+ "Title Filter",
39
+ "Badge",
40
+ "Advanced"
41
+ ],
42
+ gropeStrategy: "all-in-all"
43
+ });
44
+ var filterDescriptors = {
45
+ english: {
46
+ query: "english",
47
+ name: "🇬🇧"
48
+ },
49
+ japanese: {
50
+ query: "japanese",
51
+ name: "🇯🇵"
52
+ },
53
+ chinese: {
54
+ query: "chinese",
55
+ name: "🇨🇳"
56
+ },
57
+ gay: {
58
+ query: "-gay",
59
+ name: "Exclude Gay"
60
+ },
61
+ fullColor: {
62
+ query: "color",
63
+ name: "Full Color"
64
+ }
65
+ };
66
+ function checkURL(url_) {
67
+ return Object.keys(filterDescriptors).reduce((url, k) => {
68
+ const q = filterDescriptors[k].query;
69
+ return nhentaiRules.store.state.custom[k] ? url.includes(q) ? url : `${url}+${q}` : url.replace(`+${q}`, () => "");
70
+ }, url_);
71
+ }
72
+ function filtersUI() {
73
+ const state = nhentaiRules.store.state;
74
+ const btnContainer = Array.from(document.querySelectorAll(".sort-type")).pop();
75
+ const descs = Array.from(Object.keys(filterDescriptors));
76
+ [
77
+ descs.slice(0, 3),
78
+ [descs[3]],
79
+ [descs[4]]
80
+ ].forEach((groupOfButtons) => {
81
+ const btns = (0, ___utils.parseHtml)(`<div class="sort-type"></div>`);
82
+ groupOfButtons.forEach((k) => {
83
+ const btn = (0, ___utils.parseHtml)(`<a href="#" ${state.custom[k] ? "style=\"background: rgba(59, 49, 70, 1)\"" : ""}>${filterDescriptors[k].name}</a>`);
84
+ btn.addEventListener("click", (e) => {
85
+ e.preventDefault();
86
+ state.custom[k] = !state.custom[k];
87
+ location.href = checkURL(location.href);
88
+ });
89
+ btns.append(btn);
90
+ });
91
+ btnContainer?.after(btns);
92
+ });
93
+ const fixedURL = checkURL(location.href);
94
+ if (location.href !== fixedURL) location.href = checkURL(location.href);
95
+ }
96
+ function findSimilar() {
97
+ let tags = Array.from(document.querySelectorAll(".tags .tag[href^=\"/tag/\"] .name")).map((tag) => tag.innerText).join(" ").split(" ");
98
+ tags = Array.from(new Set(tags)).sort((a, b) => a.length - b.length);
99
+ const urls = {
100
+ searchSimilar: `/search/?q=${tags.slice(0, 5).join("+")}`,
101
+ searchSimilarLess: `/search/?q=${tags.reverse().slice(0, 5).join("+")}`
102
+ };
103
+ Object.keys(urls).forEach((url) => {
104
+ urls[url] = checkURL(urls[url]);
105
+ });
106
+ Array.from(document.links).filter((l) => /\/(search|category|tag|character|artist|group|parody)\/\w+/.test(l.href)).forEach((l) => {
107
+ l.href = checkURL(l.href.replace(/(search|category|tag|character|artist|group|parody)\//, "search/?q=").replace(/\/$/, ""));
108
+ });
109
+ document.querySelector(".buttons")?.append((0, ___utils.parseHtml)(`<a href="${urls.searchSimilar}" class="btn" style="background: rgba(59, 49, 70, 1)"><i class="fa fa-search"></i> Similar</a>`), (0, ___utils.parseHtml)(`<a href="${urls.searchSimilarLess}" class="btn" style="background: rgba(59, 49, 70, .9)"><i class="fa fa-search"></i> Less Similar</a>`));
110
+ }
111
+ function route() {
112
+ if (!nhentaiRules.store.state.custom) {
113
+ const custom = Object.entries(filterDescriptors).reduce((acc, [k, _]) => {
114
+ acc[k] = false;
115
+ return acc;
116
+ }, {});
117
+ Object.assign(nhentaiRules.store.state, { custom });
118
+ }
119
+ if (IS_TITLE_PAGE) findSimilar();
120
+ if (IS_SEARCH_PAGE) filtersUI();
121
+ }
122
+ route();
123
+ })(___core, ___utils);
@@ -1,90 +1,82 @@
1
1
  // ==UserScript==
2
2
  // @name Obmenvsem PervertMonkey
3
3
  // @namespace pervertmonkey
4
- // @version 1.0.21
4
+ // @version 1.0.22
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=obmenvsem.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://*.obmenvsem.com/*
14
14
  // @match https://*.obmenvsem.*/*
15
15
  // @match https://*.obmenvsems.*/*
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 _GM_addStyle = (() => typeof GM_addStyle != "undefined" ? GM_addStyle : undefined)();
29
26
 
30
- const IS_USER_FILES = location.pathname.startsWith("/user_files");
31
- const IS_VIDEO_PAGE = /info.php\?id=\d+$/.test(location.href);
32
- const SEARCH_PARAM = IS_USER_FILES ? "start" : "page";
33
- function setup() {
34
- const container = document.createElement("div");
35
- container.classList.add("container");
36
- container.append(
37
- ...document.querySelectorAll(".item:has(> a.block[href *= info] > img)")
38
- );
39
- document.querySelector(".c2")?.after(container);
40
- if (!IS_VIDEO_PAGE) {
41
- _GM_addStyle("a.block[href *= info] > img:first-child { height: 240px; }");
42
- }
43
- if (IS_VIDEO_PAGE) {
44
- const vidh = document.querySelector("a[href*=mp4]");
45
- vidh?.after(
46
- _GM_addElement("video", {
47
- src: vidh.href,
48
- controls: true,
49
- width: vidh.parentElement?.offsetWidth
50
- })
51
- );
52
- }
53
- }
54
- setup();
55
- new core.Rules({
56
- paginationStrategyOptions: {
57
- getPaginationUrlGenerator() {
58
- const url = utils.parseUrl(location.href);
59
- return (offset) => {
60
- const offsetValue = IS_USER_FILES ? offset * 24 : offset;
61
- url.searchParams.set(SEARCH_PARAM, offsetValue.toString());
62
- return url.href;
63
- };
64
- },
65
- overwritePaginationLast: () => 9999,
66
- searchParamSelector: "page",
67
- paginationSelector: ".item.pages, .pagination"
68
- },
69
- containerSelectorLast: ".container",
70
- thumbs: { selector: ".item:has(> a.block[href *= info] > img)" },
71
- thumb: { strategy: "auto-text" },
72
- thumbImg: {
73
- selector: (img) => {
74
- const url = img.closest("a").href;
75
- utils.fetchHtml(url).then((dom) => {
76
- img.src = dom.querySelector("img[src*=attach]")?.src || img.src;
77
- });
78
- return img.src;
79
- }
80
- },
81
- schemeOptions: [
82
- "Title Filter",
83
- "Duration Filter",
84
- "Sort By Duration",
85
- "Badge",
86
- "Advanced"
87
- ]
88
- });
89
-
90
- })(core, utils);
27
+ (function(___core, ___utils) {
28
+ "use strict";
29
+ var _GM_addElement = (() => typeof GM_addElement != "undefined" ? GM_addElement : void 0)();
30
+ var _GM_addStyle = (() => typeof GM_addStyle != "undefined" ? GM_addStyle : void 0)();
31
+ var IS_USER_FILES = location.pathname.startsWith("/user_files");
32
+ var IS_VIDEO_PAGE = /info.php\?id=\d+$/.test(location.href);
33
+ var SEARCH_PARAM = IS_USER_FILES ? "start" : "page";
34
+ function setup() {
35
+ const container = document.createElement("div");
36
+ container.classList.add("container");
37
+ container.append(...document.querySelectorAll(".item:has(> a.block[href *= info] > img)"));
38
+ document.querySelector(".c2")?.after(container);
39
+ if (!IS_VIDEO_PAGE) _GM_addStyle("a.block[href *= info] > img:first-child { height: 240px; }");
40
+ if (IS_VIDEO_PAGE) {
41
+ const vidh = document.querySelector("a[href*=mp4]");
42
+ vidh?.after(_GM_addElement("video", {
43
+ src: vidh.href,
44
+ controls: true,
45
+ width: vidh.parentElement?.offsetWidth
46
+ }));
47
+ }
48
+ }
49
+ setup();
50
+ new ___core.Rules({
51
+ paginationStrategyOptions: {
52
+ getPaginationUrlGenerator() {
53
+ const url = (0, ___utils.parseUrl)(location.href);
54
+ return (offset) => {
55
+ const offsetValue = IS_USER_FILES ? offset * 24 : offset;
56
+ url.searchParams.set(SEARCH_PARAM, offsetValue.toString());
57
+ return url.href;
58
+ };
59
+ },
60
+ overwritePaginationLast: () => 9999,
61
+ searchParamSelector: "page",
62
+ paginationSelector: ".item.pages, .pagination"
63
+ },
64
+ containerSelectorLast: ".container",
65
+ thumbs: { selector: ".item:has(> a.block[href *= info] > img)" },
66
+ thumb: { strategy: "auto-text" },
67
+ thumbImg: { selector: (img) => {
68
+ const url = img.closest("a").href;
69
+ (0, ___utils.fetchHtml)(url).then((dom) => {
70
+ img.src = dom.querySelector("img[src*=attach]")?.src || img.src;
71
+ });
72
+ return img.src;
73
+ } },
74
+ schemeOptions: [
75
+ "Title Filter",
76
+ "Duration Filter",
77
+ "Sort By Duration",
78
+ "Badge",
79
+ "Advanced"
80
+ ]
81
+ });
82
+ })(___core, ___utils);
@@ -1,66 +1,69 @@
1
1
  // ==UserScript==
2
2
  // @name PornHub PervertMonkey
3
3
  // @namespace pervertmonkey
4
- // @version 4.0.19
4
+ // @version 4.0.20
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=pornhub.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://*.pornhub.com/*
14
14
  // @exclude https://*.pornhub.com/embed/*
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.27/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
- paginationStrategyOptions: {
27
- paginationSelector: ".paginationGated",
28
- overwritePaginationLast: (n) => n === 9 ? 9999 : n
29
- },
30
- containerSelector: () => [...document.querySelectorAll("ul:has(> li[data-video-vkey])")].filter((e) => e.children.length > 0 && e.checkVisibility()).sort((a, b) => b.children.length - a.children.length)?.[0],
31
- containerHomogenity: { id: true, className: true },
32
- thumbs: { selector: "li[data-video-vkey]" },
33
- thumb: {
34
- selectors: {
35
- title: "span.title",
36
- uploader: ".usernameWrap",
37
- duration: ".duration",
38
- views: { selector: ".views", type: "float" }
39
- }
40
- },
41
- thumbImg: {
42
- selector: ["data-mediumthumb", "data-image"]
43
- },
44
- gropeStrategy: "all-in-all",
45
- schemeOptions: [
46
- "Title Filter",
47
- "Uploader Filter",
48
- "Duration Filter",
49
- "Sort By",
50
- "Badge",
51
- "Advanced"
52
- ]
53
- });
54
- function bypassAgeVerification() {
55
- cookieStore.set({
56
- name: "accessAgeDisclaimerPH",
57
- value: "2",
58
- expires: Date.now() + 90 * 24 * 60 * 60 * 1e3
59
- });
60
- document.querySelectorAll('[data-label="over18_enter"]').forEach((b) => {
61
- b.click();
62
- });
63
- }
64
- bypassAgeVerification();
65
24
 
66
- })(core);
25
+ (function(___core) {
26
+ "use strict";
27
+ new ___core.Rules({
28
+ paginationStrategyOptions: {
29
+ paginationSelector: ".paginationGated",
30
+ overwritePaginationLast: (n) => n === 9 ? 9999 : n
31
+ },
32
+ containerSelector: () => [...document.querySelectorAll("ul:has(> li[data-video-vkey])")].filter((e) => e.children.length > 0 && e.checkVisibility()).sort((a, b) => b.children.length - a.children.length)?.[0],
33
+ dataManagerOptions: { containerHomogenity: {
34
+ id: true,
35
+ className: true
36
+ } },
37
+ thumbs: { selector: "li[data-video-vkey]" },
38
+ thumb: { selectors: {
39
+ title: "span.title",
40
+ uploader: ".usernameWrap",
41
+ duration: ".duration",
42
+ views: {
43
+ selector: ".views",
44
+ type: "float"
45
+ }
46
+ } },
47
+ thumbImg: { selector: ["data-mediumthumb", "data-image"] },
48
+ gropeStrategy: "all-in-all",
49
+ schemeOptions: [
50
+ "Title Filter",
51
+ "Uploader Filter",
52
+ "Duration Filter",
53
+ "Sort By",
54
+ "Badge",
55
+ "Advanced"
56
+ ]
57
+ });
58
+ function bypassAgeVerification() {
59
+ cookieStore.set({
60
+ name: "accessAgeDisclaimerPH",
61
+ value: "2",
62
+ expires: Date.now() + 2160 * 60 * 60 * 1e3
63
+ });
64
+ document.querySelectorAll("[data-label=\"over18_enter\"]").forEach((b) => {
65
+ b.click();
66
+ });
67
+ }
68
+ bypassAgeVerification();
69
+ })(___core);