pervert-monkey 1.0.5 → 1.0.7

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 (54) hide show
  1. package/README.md +20 -0
  2. package/dist/core/pervertmonkey.core.es.d.ts +17 -4
  3. package/dist/core/pervertmonkey.core.es.js +277 -257
  4. package/dist/core/pervertmonkey.core.es.js.map +1 -1
  5. package/dist/core/pervertmonkey.core.umd.js +277 -257
  6. package/dist/core/pervertmonkey.core.umd.js.map +1 -1
  7. package/package.json +3 -4
  8. package/src/core/data-control/data-manager.ts +1 -2
  9. package/src/core/infinite-scroll/index.ts +1 -3
  10. package/src/core/jabroni-config/default-scheme.ts +1 -0
  11. package/src/core/jabroni-config/index.ts +2 -0
  12. package/src/core/rules/index.ts +5 -6
  13. package/src/userscripts/index.ts +1 -1
  14. package/src/userscripts/meta.json +1 -5
  15. package/src/userscripts/scripts/3hentai.ts +0 -1
  16. package/src/userscripts/scripts/camgirlfinder.ts +0 -1
  17. package/src/userscripts/scripts/camwhores.ts +4 -5
  18. package/src/userscripts/scripts/e-hentai.ts +0 -1
  19. package/src/userscripts/scripts/ebalka.ts +4 -5
  20. package/src/userscripts/scripts/eporner.ts +3 -4
  21. package/src/userscripts/scripts/erome.ts +3 -4
  22. package/src/userscripts/scripts/eroprofile.ts +1 -2
  23. package/src/userscripts/scripts/javhdporn.ts +1 -2
  24. package/src/userscripts/scripts/missav.ts +2 -3
  25. package/src/userscripts/scripts/motherless.ts +3 -4
  26. package/src/userscripts/scripts/namethatporn.ts +1 -2
  27. package/src/userscripts/scripts/nhentai.ts +2 -3
  28. package/src/userscripts/scripts/pornhub.ts +1 -2
  29. package/src/userscripts/scripts/spankbang.ts +4 -5
  30. package/src/userscripts/scripts/thisvid.ts +715 -0
  31. package/src/userscripts/scripts/xhamster.ts +4 -5
  32. package/src/userscripts/scripts/xvideos.ts +4 -8
  33. package/src/utils/events/index.ts +1 -1
  34. package/src/utils/events/on-hover.ts +42 -0
  35. package/src/utils/index.ts +3 -1
  36. package/dist/userscripts/3hentai.user.js +0 -34
  37. package/dist/userscripts/camgirlfinder.user.js +0 -66
  38. package/dist/userscripts/camwhores.user.js +0 -375
  39. package/dist/userscripts/e-hentai.user.js +0 -70
  40. package/dist/userscripts/ebalka.user.js +0 -63
  41. package/dist/userscripts/eporner.user.js +0 -103
  42. package/dist/userscripts/erome.user.js +0 -105
  43. package/dist/userscripts/eroprofile.user.js +0 -52
  44. package/dist/userscripts/javhdporn.user.js +0 -36
  45. package/dist/userscripts/missav.user.js +0 -40
  46. package/dist/userscripts/motherless.user.js +0 -178
  47. package/dist/userscripts/namethatporn.user.js +0 -77
  48. package/dist/userscripts/nhentai.user.js +0 -120
  49. package/dist/userscripts/pornhub.user.js +0 -57
  50. package/dist/userscripts/spankbang.user.js +0 -71
  51. package/dist/userscripts/thisvid.user.js +0 -2660
  52. package/dist/userscripts/xhamster.user.js +0 -161
  53. package/dist/userscripts/xvideos.user.js +0 -87
  54. package/src/utils/events/on-pointer-over-and-leave.ts +0 -35
@@ -1,120 +0,0 @@
1
- // ==UserScript==
2
- // @name NHentai PervertMonkey
3
- // @namespace pervertmonkey
4
- // @version 4.0.0
5
- // @author violent-orangutan
6
- // @description Infinite scroll [optional], Filter by Title
7
- // @license MIT
8
- // @icon https://www.google.com/s2/favicons?sz=64&domain=nhentai.net
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://*.nhentai.*/*
14
- // @match https://*.nhentai.net/*
15
- // @require https://cdn.jsdelivr.net/npm/pervert-monkey@latest/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
- const IS_TITLE_PAGE = /^\/g\/\d+/.test(location.pathname);
26
- const IS_SEARCH_PAGE = /^\/search\//.test(location.pathname);
27
- const nhentaiRules = new core.RulesGlobal({
28
- getThumbImgDataAttrDelete: "auto",
29
- getThumbImgDataStrategy: "auto",
30
- thumbsSelector: ".gallery",
31
- containerSelectorLast: ".index-container, .container",
32
- titleSelector: ".caption",
33
- customDataSelectorFns: ["filterInclude", "filterExclude"],
34
- schemeOptions: ["Text Filter", "Badge", "Advanced"],
35
- gropeStrategy: "all-in-all"
36
- });
37
- const filterDescriptors = {
38
- english: { query: "english", name: "🇬🇧" },
39
- japanese: { query: "japanese", name: "🇯🇵" },
40
- chinese: { query: "chinese", name: "🇨🇳" },
41
- gay: { query: "-gay", name: "Exclude Gay" },
42
- fullColor: { query: "color", name: "Full Color" }
43
- };
44
- function checkURL(url_) {
45
- return Object.keys(filterDescriptors).reduce((url, k) => {
46
- const q = filterDescriptors[k].query;
47
- return nhentaiRules.store.state.custom[k] ? url.includes(q) ? url : `${url}+${q}` : url.replace(`+${q}`, () => "");
48
- }, url_);
49
- }
50
- function filtersUI() {
51
- const state = nhentaiRules.store.state;
52
- const btnContainer = Array.from(document.querySelectorAll(".sort-type")).pop();
53
- const descs = Array.from(Object.keys(filterDescriptors));
54
- [descs.slice(0, 3), [descs[3]], [descs[4]]].forEach((groupOfButtons) => {
55
- const btns = utils.parseHtml(`<div class="sort-type"></div>`);
56
- groupOfButtons.forEach((k) => {
57
- const btn = utils.parseHtml(
58
- `<a href="#" ${state.custom[k] ? 'style="background: rgba(59, 49, 70, 1)"' : ""}>${filterDescriptors[k].name}</a>`
59
- );
60
- btn.addEventListener("click", (e) => {
61
- e.preventDefault();
62
- state.custom[k] = !state.custom[k];
63
- location.href = checkURL(location.href);
64
- });
65
- btns.append(btn);
66
- });
67
- btnContainer?.after(btns);
68
- });
69
- const fixedURL = checkURL(location.href);
70
- if (location.href !== fixedURL) location.href = checkURL(location.href);
71
- }
72
- function findSimilar() {
73
- let tags = Array.from(
74
- document.querySelectorAll('.tags .tag[href^="/tag/"] .name')
75
- ).map((tag) => tag.innerText).join(" ").split(" ");
76
- tags = Array.from(new Set(tags)).sort((a, b) => a.length - b.length);
77
- const urls = {
78
- searchSimilar: `/search/?q=${tags.slice(0, 5).join("+")}`,
79
- searchSimilarLess: `/search/?q=${tags.reverse().slice(0, 5).join("+")}`
80
- };
81
- Object.keys(urls).forEach((url) => {
82
- urls[url] = checkURL(urls[url]);
83
- });
84
- Array.from(document.links).filter(
85
- (l) => /\/(search|category|tag|character|artist|group|parody)\/\w+/.test(l.href)
86
- ).forEach((l) => {
87
- l.href = checkURL(
88
- l.href.replace(/(search|category|tag|character|artist|group|parody)\//, "search/?q=").replace(/\/$/, "")
89
- );
90
- });
91
- document.querySelector(".buttons")?.append(
92
- utils.parseHtml(
93
- `<a href="${urls.searchSimilar}" class="btn" style="background: rgba(59, 49, 70, 1)"><i class="fa fa-search"></i> Similar</a>`
94
- ),
95
- utils.parseHtml(
96
- `<a href="${urls.searchSimilarLess}" class="btn" style="background: rgba(59, 49, 70, .9)"><i class="fa fa-search"></i> Less Similar</a>`
97
- )
98
- );
99
- }
100
- function route() {
101
- if (!nhentaiRules.store.state.custom) {
102
- const custom = Object.entries(filterDescriptors).reduce(
103
- (acc, [k, _]) => {
104
- acc[k] = false;
105
- return acc;
106
- },
107
- {}
108
- );
109
- Object.assign(nhentaiRules.store.state, { custom });
110
- }
111
- if (IS_TITLE_PAGE) {
112
- findSimilar();
113
- }
114
- if (IS_SEARCH_PAGE) {
115
- filtersUI();
116
- }
117
- }
118
- route();
119
-
120
- })(core, utils);
@@ -1,57 +0,0 @@
1
- // ==UserScript==
2
- // @name PornHub PervertMonkey
3
- // @namespace pervertmonkey
4
- // @version 4.0.0
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=pornhub.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://*.pornhub.com/*
14
- // @exclude https://*.pornhub.com/embed/*
15
- // @require https://cdn.jsdelivr.net/npm/pervert-monkey@latest/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) {
23
- 'use strict';
24
-
25
- new core.RulesGlobal({
26
- paginationStrategyOptions: {
27
- paginationSelector: ".paginationGated",
28
- overwritePaginationLast: (n) => n === 9 ? 999 : n
29
- },
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 }
33
- },
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
- gropeStrategy: "all-in-all",
41
- schemeOptions: ["Text Filter", "Duration Filter", "Badge", "Advanced"]
42
- });
43
- function bypassAgeVerification() {
44
- document.querySelectorAll('[data-label="over18_enter"]').forEach((b) => {
45
- b.click();
46
- });
47
- setTimeout(() => {
48
- cookieStore.set({
49
- name: "accessAgeDisclaimerPH",
50
- value: "2",
51
- expires: Date.now() + 90 * 24 * 60 * 60 * 1e3
52
- });
53
- }, 1e3);
54
- }
55
- bypassAgeVerification();
56
-
57
- })(core);
@@ -1,71 +0,0 @@
1
- // ==UserScript==
2
- // @name SpankBang.com PervertMonkey
3
- // @namespace pervertmonkey
4
- // @version 4.0.0
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=spankbang.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://*.spankbang.*/*
14
- // @match https://*.spankbang.com/*
15
- // @require https://cdn.jsdelivr.net/npm/pervert-monkey@latest/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
- new core.RulesGlobal({
26
- containerSelector: ".main-container .js-media-list, .main_content_container .video-list",
27
- paginationStrategyOptions: {
28
- paginationSelector: ".paginate-bar, .pagination"
29
- },
30
- thumbsSelector: ".video-item:not(.clear-fix), .js-video-item",
31
- getThumbImgDataStrategy: "auto",
32
- titleSelector: "[title]",
33
- durationSelector: '[data-testid="video-item-length"]',
34
- gropeStrategy: "all-in-all",
35
- schemeOptions: ["Text Filter", "Duration Filter", "Badge", "Advanced"],
36
- animatePreview
37
- });
38
- function animatePreview(container) {
39
- function createPreviewElement(src) {
40
- return utils.parseHtml(`
41
- <div class="video-js vjs-controls-disabled vjs-workinghover vjs-v7 vjs-playing vjs-has-started mp4t_video-dimensions vjs-user-inactive"
42
- id="mp4t_video" tabindex="-1" lang="en" translate="no" role="region" aria-label="Video Player"
43
- style="opacity: 1;">
44
- <video id="mp4t_video_html5_api" class="vjs-tech" tabindex="-1" autoplay="autoplay" muted="muted" playsinline="playsinline"
45
- src="${src}">
46
- </video>
47
- </div>`);
48
- }
49
- function animateThumb(e) {
50
- const src = e.querySelector("[data-preview]")?.getAttribute("data-preview");
51
- const vid = createPreviewElement(src);
52
- e.append(vid);
53
- return () => {
54
- const v = vid.querySelector("video");
55
- utils.exterminateVideo(v);
56
- vid.remove();
57
- };
58
- }
59
- utils.onPointerOverAndLeave(
60
- container,
61
- (e) => e.tagName === "IMG",
62
- (e) => {
63
- const target = e;
64
- const leaveTarget = target.closest(".thumb");
65
- const onOverCallback = animateThumb(leaveTarget);
66
- return { leaveTarget, onOverCallback };
67
- }
68
- );
69
- }
70
-
71
- })(core, utils);