pervert-monkey 1.0.8 → 1.0.10

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 (65) hide show
  1. package/dist/core/pervertmonkey.core.es.d.ts +121 -59
  2. package/dist/core/pervertmonkey.core.es.js +2555 -1812
  3. package/dist/core/pervertmonkey.core.es.js.map +1 -1
  4. package/dist/core/pervertmonkey.core.umd.js +2554 -1811
  5. package/dist/core/pervertmonkey.core.umd.js.map +1 -1
  6. package/dist/userscripts/3hentai.user.js +47 -9
  7. package/dist/userscripts/camgirlfinder.user.js +1 -1
  8. package/dist/userscripts/camwhores.user.js +15 -9
  9. package/dist/userscripts/e-hentai.user.js +12 -6
  10. package/dist/userscripts/ebalka.user.js +11 -5
  11. package/dist/userscripts/eporner.user.js +15 -10
  12. package/dist/userscripts/erome.user.js +11 -10
  13. package/dist/userscripts/eroprofile.user.js +9 -5
  14. package/dist/userscripts/javhdporn.user.js +9 -5
  15. package/dist/userscripts/missav.user.js +10 -6
  16. package/dist/userscripts/motherless.user.js +15 -8
  17. package/dist/userscripts/namethatporn.user.js +17 -13
  18. package/dist/userscripts/nhentai.user.js +12 -6
  19. package/dist/userscripts/obmenvsem.user.js +69 -0
  20. package/dist/userscripts/pornhub.user.js +14 -10
  21. package/dist/userscripts/spankbang.user.js +10 -6
  22. package/dist/userscripts/thisvid.user.js +27 -21
  23. package/dist/userscripts/xhamster.user.js +26 -26
  24. package/dist/userscripts/xvideos.user.js +19 -17
  25. package/package.json +6 -4
  26. package/src/core/{data-control → data-handler}/data-filter.ts +6 -10
  27. package/src/core/{data-control → data-handler}/data-manager.ts +8 -7
  28. package/src/core/data-handler/index.ts +2 -0
  29. package/src/core/index.ts +4 -4
  30. package/src/core/infinite-scroll/index.ts +20 -29
  31. package/src/core/parsers/index.ts +4 -0
  32. package/src/core/{pagination-parsing → parsers/pagination-parser}/index.ts +3 -0
  33. package/src/core/{pagination-parsing → parsers/pagination-parser}/pagination-strategies/PaginationStrategy.ts +1 -1
  34. package/src/core/{pagination-parsing → parsers/pagination-parser}/pagination-strategies/PaginationStrategyDataParams.ts +1 -1
  35. package/src/core/{pagination-parsing → parsers/pagination-parser}/pagination-strategies/PaginationStrategyPathnameParams.ts +2 -1
  36. package/src/core/{pagination-parsing → parsers/pagination-parser}/pagination-utils/index.ts +1 -4
  37. package/src/core/parsers/thumb-data-parser.ts +96 -0
  38. package/src/core/parsers/thumb-img-parser.ts +62 -0
  39. package/src/core/parsers/thumbs-parser.ts +29 -0
  40. package/src/core/rules/index.ts +39 -207
  41. package/src/userscripts/ascii-logos.js +43 -0
  42. package/src/userscripts/scripts/3hentai.ts +46 -6
  43. package/src/userscripts/scripts/camwhores.ts +19 -13
  44. package/src/userscripts/scripts/e-hentai.ts +13 -7
  45. package/src/userscripts/scripts/ebalka.ts +11 -5
  46. package/src/userscripts/scripts/eporner.ts +16 -10
  47. package/src/userscripts/scripts/erome.ts +11 -10
  48. package/src/userscripts/scripts/eroprofile.ts +10 -6
  49. package/src/userscripts/scripts/javhdporn.ts +9 -5
  50. package/src/userscripts/scripts/missav.ts +10 -6
  51. package/src/userscripts/scripts/motherless.ts +18 -9
  52. package/src/userscripts/scripts/namethatporn.ts +18 -14
  53. package/src/userscripts/scripts/nhentai.ts +13 -8
  54. package/src/userscripts/scripts/obmenvsem.ts +56 -0
  55. package/src/userscripts/scripts/pornhub.ts +14 -10
  56. package/src/userscripts/scripts/spankbang.ts +10 -6
  57. package/src/userscripts/scripts/thisvid.ts +32 -27
  58. package/src/userscripts/scripts/xhamster.ts +37 -38
  59. package/src/userscripts/scripts/xvideos.ts +18 -16
  60. package/src/utils/index.ts +7 -19
  61. package/src/utils/parsers/index.ts +4 -0
  62. package/src/utils/strings/index.ts +2 -0
  63. package/src/core/data-control/index.ts +0 -2
  64. /package/src/core/{pagination-parsing → parsers/pagination-parser}/pagination-strategies/PaginationStrategySearchParams.ts +0 -0
  65. /package/src/core/{pagination-parsing → parsers/pagination-parser}/pagination-strategies/index.ts +0 -0
@@ -1,7 +1,7 @@
1
1
  // ==UserScript==
2
2
  // @name 3Hentai PervertMonkey
3
3
  // @namespace pervertmonkey
4
- // @version 1.0.0
4
+ // @version 1.0.2
5
5
  // @author violent-orangutan
6
6
  // @description Infinite scroll [optional], Filter by Title
7
7
  // @license MIT
@@ -11,24 +11,62 @@
11
11
  // @source github:smartacephale/sleazy-fork
12
12
  // @supportURL https://github.com/smartacephale/sleazy-fork/issues
13
13
  // @match https://*.3hentai.net/*
14
- // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.8/dist/core/pervertmonkey.core.umd.js
14
+ // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.10/dist/core/pervertmonkey.core.umd.js
15
15
  // @require data:application/javascript,var core = window.pervertmonkey.core || pervertmonkey.core; var utils = core;
16
16
  // @grant GM_addStyle
17
17
  // @grant unsafeWindow
18
18
  // @run-at document-idle
19
19
  // ==/UserScript==
20
20
 
21
- (function (core) {
21
+ (function (core, utils) {
22
22
  'use strict';
23
23
 
24
- new core.RulesGlobal({
24
+ new core.Rules({
25
25
  containerSelectorLast: ".listing-container",
26
- thumbsSelector: ".doujin-col",
27
- titleSelector: ".title",
28
- getThumbImgDataStrategy: "auto",
26
+ thumbs: {
27
+ selector: ".doujin-col"
28
+ },
29
+ thumb: {
30
+ selectors: {
31
+ title: ".title"
32
+ }
33
+ },
34
+ thumbImg: {
35
+ strategy: "auto"
36
+ },
29
37
  gropeStrategy: "all-in-all",
30
38
  customDataSelectorFns: ["filterInclude", "filterExclude"],
31
- schemeOptions: ["Text Filter", "Badge", "Advanced"]
39
+ schemeOptions: ["Text Filter", "Badge", "Advanced"],
40
+ animatePreview
32
41
  });
42
+ function animatePreview() {
43
+ const tick = new utils.Tick(500, false);
44
+ const end = 999;
45
+ function rotate(src) {
46
+ return src.replace(
47
+ /(\d+)(?=t\.jpg$)/,
48
+ (_, n) => `${utils.circularShift(parseInt(n), end)}`
49
+ );
50
+ }
51
+ utils.OnHover.create(
52
+ document.body,
53
+ (e) => e instanceof HTMLImageElement && e.src.endsWith(".jpg"),
54
+ (e) => {
55
+ const t = e;
56
+ const origin = t.src;
57
+ t.src = t.src.replace(/\w+\.\w+$/, "1t.jpg");
58
+ t.onerror = (_) => tick.stop();
59
+ tick.start(
60
+ () => {
61
+ t.src = rotate(t.src);
62
+ },
63
+ () => {
64
+ t.src = origin;
65
+ }
66
+ );
67
+ },
68
+ (_) => tick.stop()
69
+ );
70
+ }
33
71
 
34
- })(core);
72
+ })(core, utils);
@@ -11,7 +11,7 @@
11
11
  // @source github:smartacephale/sleazy-fork
12
12
  // @supportURL https://github.com/smartacephale/sleazy-fork/issues
13
13
  // @match https://camgirlfinder.net/*
14
- // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.8/dist/core/pervertmonkey.core.umd.js
14
+ // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.10/dist/core/pervertmonkey.core.umd.js
15
15
  // @require data:application/javascript,var core = window.pervertmonkey.core || pervertmonkey.core; var utils = core;
16
16
  // @grant none
17
17
  // @run-at document-idle
@@ -13,7 +13,7 @@
13
13
  // @match https://*.camwhores.tv
14
14
  // @match https://*.camwhores.*/*
15
15
  // @exclude https://*.camwhores.tv/*mode=async*
16
- // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.8/dist/core/pervertmonkey.core.umd.js
16
+ // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.10/dist/core/pervertmonkey.core.umd.js
17
17
  // @require data:application/javascript,var core = window.pervertmonkey.core || pervertmonkey.core; var utils = core;
18
18
  // @grant GM_addStyle
19
19
  // @grant unsafeWindow
@@ -91,20 +91,26 @@
91
91
  const IS_COMMUNITY_LIST = /\/members\/$/.test(location.pathname);
92
92
  const IS_VIDEO_PAGE = /^(\/videos)?\/\d+\//.test(location.pathname);
93
93
  const IS_LOGGED_IN = document.cookie.includes("kt_member");
94
- const rules = new core.RulesGlobal({
94
+ const rules = new core.Rules({
95
95
  containerSelector: '[id*="playlist"]:has(> .item .title),[id*="videos"]:has(> .item .title),form:has(>.item .title)',
96
96
  paginationStrategyOptions: {
97
97
  paginationSelector: ".pagination:not([id *= member])",
98
98
  overwritePaginationLast: IS_MEMBER_PAGE ? () => 1 : (x) => x === 9 ? 9999 : x
99
99
  },
100
- getThumbImgDataAttrSelector: "data-original",
101
- getThumbImgDataStrategy: "auto",
102
- thumbsSelector: ".list-videos .item, .playlist .item, .list-playlists > div > .item, .item:has(.title)",
103
- gropeStrategy: "all-in-all",
104
- getThumbDataStrategy: "auto-select",
105
- customThumbDataSelectors: {
106
- private: { type: "boolean", selector: "[class*=private]" }
100
+ thumbs: {
101
+ selector: ".list-videos .item, .playlist .item, .list-playlists > div > .item, .item:has(.title)"
102
+ },
103
+ thumb: {
104
+ strategy: "auto-select",
105
+ selectors: {
106
+ private: { type: "boolean", selector: "[class*=private]" }
107
+ }
107
108
  },
109
+ thumbImg: {
110
+ selector: "data-original",
111
+ strategy: "auto"
112
+ },
113
+ gropeStrategy: "all-in-all",
108
114
  customDataSelectorFns: [
109
115
  "filterInclude",
110
116
  "filterExclude",
@@ -11,7 +11,7 @@
11
11
  // @source github:smartacephale/sleazy-fork
12
12
  // @supportURL https://github.com/smartacephale/sleazy-fork/issues
13
13
  // @match https://*.e-hentai.org/*
14
- // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.8/dist/core/pervertmonkey.core.umd.js
14
+ // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.10/dist/core/pervertmonkey.core.umd.js
15
15
  // @require data:application/javascript,var core = window.pervertmonkey.core || pervertmonkey.core; var utils = core;
16
16
  // @grant GM_addStyle
17
17
  // @grant unsafeWindow
@@ -21,12 +21,18 @@
21
21
  (function (core, utils) {
22
22
  'use strict';
23
23
 
24
- new core.RulesGlobal({
25
- thumbsSelector: ".gl1t",
26
- titleSelector: ".glname",
24
+ new core.Rules({
25
+ thumbs: { selector: ".gl1t" },
26
+ thumb: {
27
+ selectors: {
28
+ title: ".glname"
29
+ }
30
+ },
31
+ thumbImg: {
32
+ selector: "data-lazy-load",
33
+ strategy: "auto"
34
+ },
27
35
  containerSelectorLast: ".itg.gld",
28
- getThumbImgDataAttrSelector: "data-lazy-load",
29
- getThumbImgDataStrategy: "auto",
30
36
  paginationStrategyOptions: createPaginationStrategyOptions(),
31
37
  customDataSelectorFns: ["filterInclude", "filterExclude"],
32
38
  schemeOptions: ["Text Filter", "Badge", "Advanced"]
@@ -15,7 +15,7 @@
15
15
  // @match https://*ebalka.*.*/*
16
16
  // @match https://*.ebalk*.*/*
17
17
  // @match https://*.fuckingbear*.*/*
18
- // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.8/dist/core/pervertmonkey.core.umd.js
18
+ // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.10/dist/core/pervertmonkey.core.umd.js
19
19
  // @require data:application/javascript,var core = window.pervertmonkey.core || pervertmonkey.core; var utils = core;
20
20
  // @grant GM_addStyle
21
21
  // @grant unsafeWindow
@@ -25,14 +25,20 @@
25
25
  (function (core, utils) {
26
26
  'use strict';
27
27
 
28
- new core.RulesGlobal({
28
+ new core.Rules({
29
29
  containerSelectorLast: ".content__video",
30
30
  paginationStrategyOptions: {
31
31
  paginationSelector: ".pagination:not([id *= member])"
32
32
  },
33
- thumbsSelector: ".card_video",
34
- titleSelector: ".card__title",
35
- durationSelector: ".card__spot > span:last-child",
33
+ thumbs: {
34
+ selector: ".card_video"
35
+ },
36
+ thumb: {
37
+ selectors: {
38
+ title: ".card__title",
39
+ duration: ".card__spot > span:last-child"
40
+ }
41
+ },
36
42
  animatePreview,
37
43
  schemeOptions: ["Text Filter", "Badge", "Duration Filter", "Advanced"]
38
44
  });
@@ -12,7 +12,7 @@
12
12
  // @supportURL https://github.com/smartacephale/sleazy-fork/issues
13
13
  // @match https://*.eporner.com/*
14
14
  // @match https://*.eporner.*/*
15
- // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.8/dist/core/pervertmonkey.core.umd.js
15
+ // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.10/dist/core/pervertmonkey.core.umd.js
16
16
  // @require data:application/javascript,var core = window.pervertmonkey.core || pervertmonkey.core; var utils = core;
17
17
  // @grant GM_addStyle
18
18
  // @grant unsafeWindow
@@ -25,20 +25,25 @@
25
25
  var _unsafeWindow = (() => typeof unsafeWindow != "undefined" ? unsafeWindow : undefined)();
26
26
 
27
27
  const show_video_prev = _unsafeWindow.show_video_prev;
28
- new core.RulesGlobal({
28
+ new core.Rules({
29
29
  paginationStrategyOptions: {
30
30
  paginationSelector: ".numlist2"
31
31
  },
32
- customThumbDataSelectors: {
33
- quality: { type: "number", selector: '[title="Quality"]' }
32
+ thumb: {
33
+ selectors: {
34
+ quality: { type: "number", selector: '[title="Quality"]' },
35
+ title: "a",
36
+ uploader: '[title="Uploader"]',
37
+ duration: '[title="Duration"]'
38
+ }
39
+ },
40
+ thumbImg: {
41
+ strategy: "auto"
42
+ },
43
+ thumbs: {
44
+ selector: "div[id^=vf][data-id]"
34
45
  },
35
46
  containerSelectorLast: "#vidresults",
36
- thumbsSelector: "div[id^=vf][data-id]",
37
- uploaderSelector: '[title="Uploader"]',
38
- titleSelector: "a",
39
- durationSelector: '[title="Duration"]',
40
- getThumbImgDataStrategy: "auto",
41
- getThumbImgDataAttrDelete: "auto",
42
47
  customDataSelectorFns: [
43
48
  "filterInclude",
44
49
  "filterExclude",
@@ -11,7 +11,7 @@
11
11
  // @source github:smartacephale/sleazy-fork
12
12
  // @supportURL https://github.com/smartacephale/sleazy-fork/issues
13
13
  // @match *://*.erome.com/*
14
- // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.8/dist/core/pervertmonkey.core.umd.js
14
+ // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.10/dist/core/pervertmonkey.core.umd.js
15
15
  // @require data:application/javascript,var core = window.pervertmonkey.core || pervertmonkey.core; var utils = core;
16
16
  // @grant GM_addStyle
17
17
  // @grant unsafeWindow
@@ -25,16 +25,17 @@
25
25
  var _unsafeWindow = (() => typeof unsafeWindow != "undefined" ? unsafeWindow : undefined)();
26
26
 
27
27
  const $ = _unsafeWindow.$;
28
- const rules = new core.RulesGlobal({
28
+ const rules = new core.Rules({
29
29
  containerSelector: "#albums",
30
- thumbsSelector: "div[id^=album-]",
31
- titleSelector: ".album-title",
32
- uploaderSelector: ".album-user",
33
30
  gropeStrategy: "all-in-one",
34
- customThumbDataSelectors: {
35
- videoAlbum: {
36
- type: "boolean",
37
- selector: ".album-videos"
31
+ thumbs: {
32
+ selector: "div[id^=album-]"
33
+ },
34
+ thumb: {
35
+ selectors: {
36
+ title: ".album-title",
37
+ uploader: ".album-user",
38
+ videoAlbum: { type: "boolean", selector: ".album-videos" }
38
39
  }
39
40
  },
40
41
  storeOptions: { showPhotos: true },
@@ -67,7 +68,7 @@
67
68
  "Advanced"
68
69
  ]
69
70
  });
70
- rules.infiniteScroller?.onScroll(() => {
71
+ rules.infiniteScroller?.subject.subscribe(() => {
71
72
  setTimeout(() => new LazyLoad(), 100);
72
73
  });
73
74
  _GM_addStyle(`
@@ -11,7 +11,7 @@
11
11
  // @source github: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.8/dist/core/pervertmonkey.core.umd.js
14
+ // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.10/dist/core/pervertmonkey.core.umd.js
15
15
  // @require data:application/javascript,var core = window.pervertmonkey.core || pervertmonkey.core; var utils = core;
16
16
  // @grant GM_addStyle
17
17
  // @grant unsafeWindow
@@ -22,15 +22,19 @@
22
22
  'use strict';
23
23
 
24
24
  document.querySelector(".videoGrid")?.after(document.querySelector(".clB"));
25
- new core.RulesGlobal({
25
+ new core.Rules({
26
26
  paginationStrategyOptions: {
27
27
  paginationSelector: ".boxNav2",
28
28
  searchParamSelector: "pnum"
29
29
  },
30
- titleSelector: "[title]",
31
- durationSelector: ".videoDur",
30
+ thumbs: { selector: ".video" },
31
+ thumb: {
32
+ selectors: {
33
+ title: "[title]",
34
+ duration: ".videoDur"
35
+ }
36
+ },
32
37
  containerSelector: ".videoGrid",
33
- thumbsSelector: ".video",
34
38
  customDataSelectorFns: ["filterInclude", "filterExclude", "filterDuration"],
35
39
  schemeOptions: [
36
40
  "Text Filter",
@@ -12,7 +12,7 @@
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.8/dist/core/pervertmonkey.core.umd.js
15
+ // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.10/dist/core/pervertmonkey.core.umd.js
16
16
  // @require data:application/javascript,var core = window.pervertmonkey.core || pervertmonkey.core; var utils = core;
17
17
  // @grant GM_addStyle
18
18
  // @grant unsafeWindow
@@ -22,11 +22,15 @@
22
22
  (function (core) {
23
23
  'use strict';
24
24
 
25
- new core.RulesGlobal({
25
+ new core.Rules({
26
26
  containerSelector: "div:has(> article)",
27
- thumbsSelector: "article.thumb-block",
28
- titleSelector: "header.entry-header",
29
- durationSelector: ".duration",
27
+ thumbs: { selector: "article.thumb-block" },
28
+ thumb: {
29
+ selectors: {
30
+ title: "header.entry-header",
31
+ duration: ".duration"
32
+ }
33
+ },
30
34
  paginationStrategyOptions: {
31
35
  pathnameSelector: /\/page\/(\d+)\/?$/
32
36
  },
@@ -15,7 +15,7 @@
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.8/dist/core/pervertmonkey.core.umd.js
18
+ // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.10/dist/core/pervertmonkey.core.umd.js
19
19
  // @require data:application/javascript,var core = window.pervertmonkey.core || pervertmonkey.core; var utils = core;
20
20
  // @grant GM_addStyle
21
21
  // @grant unsafeWindow
@@ -25,15 +25,19 @@
25
25
  (function (core) {
26
26
  'use strict';
27
27
 
28
- new core.RulesGlobal({
28
+ new core.Rules({
29
29
  paginationStrategyOptions: {
30
30
  paginationSelector: "nav[x-data]"
31
31
  },
32
32
  containerSelector: ".grid[x-data]",
33
- thumbsSelector: "div:has(> .thumbnail.group)",
34
- getThumbImgDataStrategy: "auto",
35
- titleSelector: "div > div > a.text-secondary",
36
- durationSelector: "div > a > span.text-xs",
33
+ thumbs: { selector: "div:has(> .thumbnail.group)" },
34
+ thumb: {
35
+ selectors: {
36
+ title: "div > div > a.text-secondary",
37
+ duration: "div > a > span.text-xs"
38
+ }
39
+ },
40
+ thumbImg: { strategy: "auto" },
37
41
  schemeOptions: ["Text Filter", "Duration Filter", "Badge", "Advanced"]
38
42
  });
39
43
 
@@ -1,7 +1,7 @@
1
1
  // ==UserScript==
2
2
  // @name Motherless PervertMonkey
3
3
  // @namespace pervertmonkey
4
- // @version 5.0.1
4
+ // @version 5.0.2
5
5
  // @author violent-orangutan
6
6
  // @description Infinite scroll [optional], Filter by Title and Duration
7
7
  // @license MIT
@@ -11,8 +11,9 @@
11
11
  // @source github:smartacephale/sleazy-fork
12
12
  // @supportURL https://github.com/smartacephale/sleazy-fork/issues
13
13
  // @match https://motherless.com/*
14
- // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.8/dist/core/pervertmonkey.core.umd.js
14
+ // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.10/dist/core/pervertmonkey.core.umd.js
15
15
  // @require data:application/javascript,var core = window.pervertmonkey.core || pervertmonkey.core; var utils = core;
16
+ // @grant GM_addElement
16
17
  // @grant GM_addStyle
17
18
  // @grant unsafeWindow
18
19
  // @run-at document-idle
@@ -21,18 +22,23 @@
21
22
  (function (core, utils) {
22
23
  'use strict';
23
24
 
25
+ var _GM_addElement = (() => typeof GM_addElement != "undefined" ? GM_addElement : undefined)();
24
26
  var _GM_addStyle = (() => typeof GM_addStyle != "undefined" ? GM_addStyle : undefined)();
25
27
  var _unsafeWindow = (() => typeof unsafeWindow != "undefined" ? unsafeWindow : undefined)();
26
28
 
27
29
  _unsafeWindow.__is_premium = true;
28
30
  const $ = _unsafeWindow.$;
29
- const rules = new core.RulesGlobal({
31
+ const rules = new core.Rules({
30
32
  containerSelectorLast: ".content-inner",
31
- thumbsSelector: ".thumb-container, .mobile-thumb",
32
- uploaderSelector: ".uploader",
33
- titleSelector: ".title",
34
- durationSelector: ".size",
35
- getThumbImgDataStrategy: "auto",
33
+ thumbs: { selector: ".thumb-container, .mobile-thumb" },
34
+ thumb: {
35
+ selectors: {
36
+ uploader: ".uploader",
37
+ title: ".title",
38
+ duration: ".size"
39
+ }
40
+ },
41
+ thumbImg: { strategy: "auto" },
36
42
  paginationStrategyOptions: {
37
43
  paginationSelector: ".pagination_link, .ml-pagination"
38
44
  },
@@ -159,6 +165,7 @@
159
165
  .ml-masonry-images.masonry-columns-6 .content-inner { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
160
166
  .ml-masonry-images.masonry-columns-8 .content-inner { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); }
161
167
  `);
168
+ document.querySelector(".ml-pagination")?.before(_GM_addElement("div", { class: "clear-left" }));
162
169
  function applySearchFilters() {
163
170
  let pathname = window.location.pathname;
164
171
  const wordsToFilter = rules.store.state.filterExcludeWords.replace(/f:/g, "").match(/(?<!user:)\b\w+\b(?!\s*:)/g) || [];
@@ -11,7 +11,7 @@
11
11
  // @source github: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.8/dist/core/pervertmonkey.core.umd.js
14
+ // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.10/dist/core/pervertmonkey.core.umd.js
15
15
  // @require data:application/javascript,var core = window.pervertmonkey.core || pervertmonkey.core; var utils = core;
16
16
  // @grant GM_addStyle
17
17
  // @grant unsafeWindow
@@ -23,23 +23,27 @@
23
23
 
24
24
  var _unsafeWindow = (() => typeof unsafeWindow != "undefined" ? unsafeWindow : undefined)();
25
25
 
26
- new core.RulesGlobal({
27
- thumbsSelector: ".item, .nsw_r_w",
26
+ new core.Rules({
27
+ thumbs: { selector: ".item, .nsw_r_w" },
28
28
  containerSelector: "#items_wrapper, #nsw_r",
29
- titleSelector: ".item_title, .nsw_r_tit",
30
- uploaderSelector: ".item_answer b, .nsw_r_desc",
29
+ thumb: {
30
+ selectors: {
31
+ title: ".item_title, .nsw_r_tit",
32
+ uploader: ".item_answer b, .nsw_r_desc",
33
+ solved: {
34
+ type: "boolean",
35
+ selector: ".item_solved, .nsw_r_slvd"
36
+ }
37
+ }
38
+ },
39
+ thumbImg: {
40
+ strategy: "auto",
41
+ selector: (img) => img.getAttribute("data-dyn")?.concat(".webp") || img.getAttribute("src")
42
+ },
31
43
  paginationStrategyOptions: {
32
44
  paginationSelector: "#smi_wrp, #nsw_p"
33
45
  },
34
- customThumbDataSelectors: {
35
- solved: {
36
- type: "boolean",
37
- selector: ".item_solved, .nsw_r_slvd"
38
- }
39
- },
40
46
  gropeStrategy: "all-in-all",
41
- getThumbImgDataStrategy: "auto",
42
- getThumbImgDataAttrSelector: (img) => img.getAttribute("data-dyn")?.concat(".webp") || img.getAttribute("src"),
43
47
  customDataSelectorFns: [
44
48
  "filterInclude",
45
49
  "filterExclude",
@@ -12,7 +12,7 @@
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.8/dist/core/pervertmonkey.core.umd.js
15
+ // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.10/dist/core/pervertmonkey.core.umd.js
16
16
  // @require data:application/javascript,var core = window.pervertmonkey.core || pervertmonkey.core; var utils = core;
17
17
  // @grant GM_addStyle
18
18
  // @grant unsafeWindow
@@ -24,12 +24,18 @@
24
24
 
25
25
  const IS_TITLE_PAGE = /^\/g\/\d+/.test(location.pathname);
26
26
  const IS_SEARCH_PAGE = /^\/search\//.test(location.pathname);
27
- const nhentaiRules = new core.RulesGlobal({
28
- getThumbImgDataAttrDelete: "auto",
29
- getThumbImgDataStrategy: "auto",
30
- thumbsSelector: ".gallery",
27
+ const nhentaiRules = new core.Rules({
28
+ thumbs: { selector: ".gallery" },
29
+ thumb: {
30
+ selectors: {
31
+ title: ".caption"
32
+ }
33
+ },
34
+ thumbImg: {
35
+ strategy: "auto",
36
+ shouldDelete: "auto"
37
+ },
31
38
  containerSelectorLast: ".index-container, .container",
32
- titleSelector: ".caption",
33
39
  customDataSelectorFns: ["filterInclude", "filterExclude"],
34
40
  schemeOptions: ["Text Filter", "Badge", "Advanced"],
35
41
  gropeStrategy: "all-in-all"
@@ -0,0 +1,69 @@
1
+ // ==UserScript==
2
+ // @name Obmensvem PervertMonkey
3
+ // @namespace pervertmonkey
4
+ // @version 1.0.1
5
+ // @author violent-orangutan
6
+ // @description Infinite scroll [optional], Filter by Title and Duration
7
+ // @license MIT
8
+ // @icon https://www.google.com/s2/favicons?sz=64&domain=obmenvsem.com
9
+ // @homepage https://github.com/smartacephale/sleazy-fork
10
+ // @homepageURL https://github.com/smartacephale/sleazy-fork
11
+ // @source github:smartacephale/sleazy-fork
12
+ // @supportURL https://github.com/smartacephale/sleazy-fork/issues
13
+ // @match https://*.obmenvsem.com/*
14
+ // @match https://*.obmenvsem.*/*
15
+ // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.10/dist/core/pervertmonkey.core.umd.js
16
+ // @require data:application/javascript,var core = window.pervertmonkey.core || pervertmonkey.core; var utils = core;
17
+ // @grant GM_addStyle
18
+ // @grant unsafeWindow
19
+ // @run-at document-idle
20
+ // ==/UserScript==
21
+
22
+ (function (core, utils) {
23
+ 'use strict';
24
+
25
+ var _GM_addStyle = (() => typeof GM_addStyle != "undefined" ? GM_addStyle : undefined)();
26
+
27
+ const IS_USER_FILES = location.pathname.startsWith("/user_files");
28
+ const SEARCH_PARAM = IS_USER_FILES ? "start" : "page";
29
+ function setup() {
30
+ const container = document.createElement("div");
31
+ container.classList.add("container");
32
+ container.append(
33
+ ...document.querySelectorAll(".item:has(> a.block[href *= info] > img)")
34
+ );
35
+ document.querySelector(".c2")?.after(container);
36
+ _GM_addStyle("a.block[href *= info] > img:first-child { height: 240px; }");
37
+ }
38
+ setup();
39
+ new core.Rules({
40
+ paginationStrategyOptions: {
41
+ getPaginationUrlGenerator() {
42
+ const url = utils.parseUrl(location.href);
43
+ return (offset) => {
44
+ const offsetValue = IS_USER_FILES ? offset * 24 : offset;
45
+ url.searchParams.set(SEARCH_PARAM, offsetValue.toString());
46
+ return url.href;
47
+ };
48
+ },
49
+ overwritePaginationLast: () => 9999,
50
+ searchParamSelector: "page",
51
+ paginationSelector: ".item.pages, .pagination"
52
+ },
53
+ containerSelectorLast: ".container",
54
+ thumbs: { selector: ".item:has(> a.block[href *= info] > img)" },
55
+ thumb: { strategy: "auto-text" },
56
+ thumbImg: {
57
+ strategy: "auto",
58
+ selector: (img) => {
59
+ const url = img.closest("a").href;
60
+ utils.fetchHtml(url).then((dom) => {
61
+ img.src = dom.querySelector("img[src*=attach]")?.src || img.src;
62
+ });
63
+ return img.src;
64
+ }
65
+ },
66
+ schemeOptions: ["Text Filter", "Duration Filter", "Badge", "Advanced"]
67
+ });
68
+
69
+ })(core, utils);
@@ -12,7 +12,7 @@
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.8/dist/core/pervertmonkey.core.umd.js
15
+ // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.10/dist/core/pervertmonkey.core.umd.js
16
16
  // @require data:application/javascript,var core = window.pervertmonkey.core || pervertmonkey.core; var utils = core;
17
17
  // @grant GM_addStyle
18
18
  // @grant unsafeWindow
@@ -22,21 +22,25 @@
22
22
  (function (core) {
23
23
  'use strict';
24
24
 
25
- new core.RulesGlobal({
25
+ new core.Rules({
26
26
  paginationStrategyOptions: {
27
27
  paginationSelector: ".paginationGated",
28
28
  overwritePaginationLast: (n) => n === 9 ? 999 : n
29
29
  },
30
30
  containerSelector: () => [...document.querySelectorAll("ul:has(> li[data-video-vkey])")].filter((e) => e.children.length > 0 && e.checkVisibility()).pop(),
31
- dataManagerOptions: {
32
- parseDataParentHomogenity: { id: true, className: true }
31
+ dataHomogenity: { 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
+ }
39
+ },
40
+ thumbImg: {
41
+ strategy: "auto",
42
+ selector: ["data-mediumthumb", "data-image"]
33
43
  },
34
- thumbsSelector: "li[data-video-vkey]",
35
- getThumbImgDataStrategy: "auto",
36
- getThumbImgDataAttrSelector: ["data-mediumthumb", "data-image"],
37
- uploaderSelector: ".usernameWrap",
38
- titleSelector: "span.title",
39
- durationSelector: ".duration",
40
44
  gropeStrategy: "all-in-all",
41
45
  schemeOptions: ["Text Filter", "Duration Filter", "Badge", "Advanced"]
42
46
  });