pervert-monkey 1.0.24 → 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 -540
  3. package/dist/core/pervertmonkey.core.es.js +8001 -9280
  4. package/dist/core/pervertmonkey.core.es.js.map +1 -1
  5. package/dist/core/pervertmonkey.core.umd.js +8829 -10050
  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 -147
  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 +44 -0
  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 -6
  31. package/src/core/parsers/pagination-parser/pagination-strategies/PaginationStrategyPathnameParams.ts +36 -1
  32. package/src/core/parsers/thumb-data-parser.ts +7 -3
  33. package/src/userscripts/index.ts +1 -1
  34. package/src/userscripts/meta.json +1 -1
  35. package/src/userscripts/scripts/3hentai.ts +1 -1
  36. package/src/userscripts/scripts/camgirlfinder.ts +1 -1
  37. package/src/userscripts/scripts/camwhores.ts +2 -2
  38. package/src/userscripts/scripts/e-hentai.ts +1 -1
  39. package/src/userscripts/scripts/ebalka.ts +1 -1
  40. package/src/userscripts/scripts/eporner.ts +41 -15
  41. package/src/userscripts/scripts/erome.ts +1 -1
  42. package/src/userscripts/scripts/eroprofile.ts +6 -6
  43. package/src/userscripts/scripts/javhdporn.ts +1 -1
  44. package/src/userscripts/scripts/missav.ts +1 -1
  45. package/src/userscripts/scripts/motherless.ts +42 -37
  46. package/src/userscripts/scripts/namethatporn.ts +1 -1
  47. package/src/userscripts/scripts/nhentai.ts +1 -1
  48. package/src/userscripts/scripts/obmenvsem.ts +1 -1
  49. package/src/userscripts/scripts/pornhub.ts +1 -1
  50. package/src/userscripts/scripts/simpcity.ts +27 -0
  51. package/src/userscripts/scripts/socialmediagirls.ts +4 -3
  52. package/src/userscripts/scripts/spankbang.ts +20 -4
  53. package/src/userscripts/scripts/thisvid.ts +8 -21
  54. package/src/userscripts/scripts/xhamster.ts +11 -3
  55. package/src/userscripts/scripts/xvideos.ts +26 -7
  56. package/src/utils/fetch/index.ts +2 -0
  57. package/src/utils/objects/memoize.ts +1 -9
  58. package/dist/test/test.user.js +0 -10301
@@ -1,75 +1,72 @@
1
1
  // ==UserScript==
2
2
  // @name E-Hentai PervertMonkey
3
3
  // @namespace pervertmonkey
4
- // @version 1.0.18
4
+ // @version 1.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=e-hentai.org
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://*.e-hentai.org/*
14
- // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.24/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, utils) {
22
- 'use strict';
20
+ var ___core = window.pervertmonkey.core || pervertmonkey.core;
21
+ var ___utils = ___core;
23
22
 
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
- },
34
- containerSelectorLast: ".itg.gld",
35
- paginationStrategyOptions: createPaginationStrategyOptions(),
36
- schemeOptions: ["Title Filter", "Badge", "Advanced"]
37
- });
38
- function createPaginationStrategyOptions() {
39
- let nextLink;
40
- function getNextLink(doc = document) {
41
- return [...doc.querySelectorAll("a#dnext[href]")].pop()?.href;
42
- }
43
- function getPaginationUrlGenerator() {
44
- const paginationUrlGenerator = async (_) => {
45
- if (!nextLink) {
46
- nextLink = getNextLink();
47
- return nextLink;
48
- }
49
- const doc = await utils.fetchHtml(nextLink);
50
- nextLink = getNextLink(doc);
51
- return nextLink;
52
- };
53
- return paginationUrlGenerator;
54
- }
55
- const totalTitles = Number.parseInt(getNextLink()?.match(/\d+$/)?.[0] || "0");
56
- return {
57
- paginationSelector: ".searchnav + div + .searchnav",
58
- overwritePaginationLast: () => totalTitles,
59
- getPaginationUrlGenerator
60
- };
61
- }
62
- function setThumbnailMode() {
63
- const IS_SEARCH_PAGE = /f_search/.test(location.search) || /^\/tag\//.test(location.pathname);
64
- if (!IS_SEARCH_PAGE) return;
65
- const selectInputT = document.querySelector("option[value=t]");
66
- if (selectInputT) {
67
- const select = selectInputT.parentElement;
68
- if (select.value === "t") return;
69
- select.value = "t";
70
- select.dispatchEvent(new Event("change"));
71
- }
72
- }
73
- setThumbnailMode();
74
23
 
75
- })(core, utils);
24
+ (function(___core, ___utils) {
25
+ "use strict";
26
+ new ___core.Rules({
27
+ thumbs: { selector: ".gl1t" },
28
+ thumb: { selectors: { title: ".glname" } },
29
+ thumbImg: { selector: "data-lazy-load" },
30
+ containerSelectorLast: ".itg.gld",
31
+ paginationStrategyOptions: createPaginationStrategyOptions(),
32
+ schemeOptions: [
33
+ "Title Filter",
34
+ "Badge",
35
+ "Advanced"
36
+ ]
37
+ });
38
+ function createPaginationStrategyOptions() {
39
+ let nextLink;
40
+ function getNextLink(doc = document) {
41
+ return [...doc.querySelectorAll("a#dnext[href]")].pop()?.href;
42
+ }
43
+ function getPaginationUrlGenerator() {
44
+ const paginationUrlGenerator = async (_) => {
45
+ if (!nextLink) {
46
+ nextLink = getNextLink();
47
+ return nextLink;
48
+ }
49
+ nextLink = getNextLink(await (0, ___utils.fetchHtml)(nextLink));
50
+ return nextLink;
51
+ };
52
+ return paginationUrlGenerator;
53
+ }
54
+ const totalTitles = Number.parseInt(getNextLink()?.match(/\d+$/)?.[0] || "0");
55
+ return {
56
+ paginationSelector: ".searchnav + div + .searchnav",
57
+ overwritePaginationLast: () => totalTitles,
58
+ getPaginationUrlGenerator
59
+ };
60
+ }
61
+ function setThumbnailMode() {
62
+ if (!(/f_search/.test(location.search) || /^\/tag\//.test(location.pathname))) return;
63
+ const selectInputT = document.querySelector("option[value=t]");
64
+ if (selectInputT) {
65
+ const select = selectInputT.parentElement;
66
+ if (select.value === "t") return;
67
+ select.value = "t";
68
+ select.dispatchEvent(new Event("change"));
69
+ }
70
+ }
71
+ setThumbnailMode();
72
+ })(___core, ___utils);
@@ -1,77 +1,74 @@
1
1
  // ==UserScript==
2
2
  // @name Ebalka PervertMonkey
3
3
  // @namespace pervertmonkey
4
- // @version 3.0.19
4
+ // @version 3.0.21
5
5
  // @author violent-orangutan
6
6
  // @description Infinite scroll [optional], Filter by Title and Duration, Sort by Duration, Download button.
7
7
  // @license MIT
8
8
  // @icon https://www.google.com/s2/favicons?sz=64&domain=ebalka.zip
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://b.ebalka.zip/*
14
14
  // @match https://a.ebalka.love/*
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.24/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, utils) {
26
- 'use strict';
24
+ var ___core = window.pervertmonkey.core || pervertmonkey.core;
25
+ var ___utils = ___core;
27
26
 
28
- new core.Rules({
29
- containerSelectorLast: ".content__video",
30
- paginationStrategyOptions: {
31
- paginationSelector: ".pagination:not([id *= member])"
32
- },
33
- thumbs: {
34
- selector: ".card_video"
35
- },
36
- thumb: {
37
- selectors: {
38
- title: ".card__title",
39
- duration: ".card__spot > span:last-child",
40
- hd: { selector: ".card__icons > .card__icon", type: "boolean" }
41
- }
42
- },
43
- animatePreview,
44
- schemeOptions: [
45
- "Title Filter",
46
- "Duration Filter",
47
- "HD Filter",
48
- "Sort By Duration",
49
- "Badge",
50
- "Advanced"
51
- ]
52
- });
53
- function animatePreview(container) {
54
- function animateThumb(thumb) {
55
- const e = thumb.querySelector(".card__thumb_video");
56
- e.classList.toggle("video-on");
57
- const src = e.querySelector(".card__image")?.getAttribute("data-preview");
58
- const videoElem = utils.parseHtml(`<video style="position: absolute; left: 0px; top: 0px; visibility: visible; margin-top: -1px;"
59
- autoplay="" loop="" playsinline="true" webkit-playsinline="true" src="${src}"></video>`);
60
- e.appendChild(videoElem);
61
- return () => {
62
- e.classList.toggle("video-on");
63
- utils.exterminateVideo(videoElem);
64
- };
65
- }
66
- utils.OnHover.create(container, ".card_video", (target) => {
67
- const thumb = target.closest(".card");
68
- return animateThumb(thumb);
69
- });
70
- }
71
- document.querySelector(".tabs-menu") && utils.downloader({
72
- append: ".tabs-menu",
73
- doBefore: () => document.querySelector("video")?.click(),
74
- buttonHtml: '<li class="ml-20"><a class="button button_regular button_list root__link">Download ⤓</a></li>'
75
- });
76
27
 
77
- })(core, utils);
28
+ (function(___core, ___utils) {
29
+ "use strict";
30
+ new ___core.Rules({
31
+ containerSelectorLast: ".content__video",
32
+ paginationStrategyOptions: { paginationSelector: ".pagination:not([id *= member])" },
33
+ thumbs: { selector: ".card_video" },
34
+ thumb: { selectors: {
35
+ title: ".card__title",
36
+ duration: ".card__spot > span:last-child",
37
+ hd: {
38
+ selector: ".card__icons > .card__icon",
39
+ type: "boolean"
40
+ }
41
+ } },
42
+ animatePreview,
43
+ schemeOptions: [
44
+ "Title Filter",
45
+ "Duration Filter",
46
+ "HD Filter",
47
+ "Sort By Duration",
48
+ "Badge",
49
+ "Advanced"
50
+ ]
51
+ });
52
+ function animatePreview(container) {
53
+ function animateThumb(thumb) {
54
+ const e = thumb.querySelector(".card__thumb_video");
55
+ e.classList.toggle("video-on");
56
+ const src = e.querySelector(".card__image")?.getAttribute("data-preview");
57
+ const videoElem = (0, ___utils.parseHtml)(`<video style="position: absolute; left: 0px; top: 0px; visibility: visible; margin-top: -1px;"
58
+ autoplay="" loop="" playsinline="true" webkit-playsinline="true" src="${src}"></video>`);
59
+ e.appendChild(videoElem);
60
+ return () => {
61
+ e.classList.toggle("video-on");
62
+ (0, ___utils.exterminateVideo)(videoElem);
63
+ };
64
+ }
65
+ ___utils.OnHover.create(container, ".card_video", (target) => {
66
+ return animateThumb(target.closest(".card"));
67
+ });
68
+ }
69
+ document.querySelector(".tabs-menu") && (0, ___utils.downloader)({
70
+ append: ".tabs-menu",
71
+ doBefore: () => document.querySelector("video")?.click(),
72
+ buttonHtml: "<li class=\"ml-20\"><a class=\"button button_regular button_list root__link\">Download ⤓</a></li>"
73
+ });
74
+ })(___core, ___utils);
@@ -1,86 +1,94 @@
1
1
  // ==UserScript==
2
2
  // @name Eporner PervertMonkey
3
3
  // @namespace pervertmonkey
4
- // @version 2.0.20
4
+ // @version 2.1.3
5
5
  // @author violent-orangutan
6
6
  // @description Infinite scroll [optional], Filter by Title, Uploader, Duration and HD, Sort by Views and Duration
7
7
  // @license MIT
8
8
  // @icon https://www.google.com/s2/favicons?sz=64&domain=eporner.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
12
- // @supportURL https://github.com/smartacephale/sleazy-fork/issues
11
+ // @source https://github.com/smartacephale/sleazy-fork
12
+ // @supportURL https://sleazyfork.org/en/scripts/552559-eporner-pervertmonkey/feedback
13
13
  // @match https://*.eporner.com/*
14
14
  // @match https://*.eporner.*/*
15
- // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.24/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, utils) {
23
- 'use strict';
21
+ var ___core = window.pervertmonkey.core || pervertmonkey.core;
22
+ var ___utils = ___core;
24
23
 
25
- var _unsafeWindow = (() => typeof unsafeWindow != "undefined" ? unsafeWindow : undefined)();
26
24
 
27
- const show_video_prev = _unsafeWindow.show_video_prev;
28
- new core.Rules({
29
- paginationStrategyOptions: {
30
- paginationSelector: ".numlist2"
31
- },
32
- thumbs: { selector: "div[id^=vf][data-id]" },
33
- thumb: {
34
- selectors: {
35
- title: "a",
36
- uploader: '[title="Uploader"]',
37
- duration: '[title="Duration"]',
38
- views: { selector: '[title="Views"]', type: "float" },
39
- quality: { selector: '[title="Quality"]', type: "number" }
40
- }
41
- },
42
- thumbImg: {
43
- strategy: "auto",
44
- remove: "auto"
45
- },
46
- containerSelectorLast: "#vidresults",
47
- customDataFilterFns: [
48
- { quality360: (el, state) => !!state.quality360 && el.quality !== 360 },
49
- { quality480: (el, state) => !!state.quality480 && el.quality !== 480 },
50
- { quality720: (el, state) => !!state.quality720 && el.quality !== 720 },
51
- { quality1080: (el, state) => !!state.quality1080 && el.quality !== 1080 },
52
- { quality2k: (el, state) => !!state.quality2k && el.quality !== 2 },
53
- { quality4k: (el, state) => !!state.quality4k && el.quality !== 4 }
54
- ],
55
- schemeOptions: [
56
- "Title Filter",
57
- "Uploader Filter",
58
- "Duration Filter",
59
- {
60
- title: "Quality Filter ",
61
- content: [
62
- { quality360: false },
63
- { quality480: false },
64
- { quality720: false },
65
- { quality1080: false },
66
- { quality2k: false },
67
- { quality4k: false }
68
- ]
69
- },
70
- "Sort By",
71
- "Badge",
72
- "Advanced"
73
- ],
74
- gropeStrategy: "all-in-all",
75
- animatePreview
76
- });
77
- function animatePreview(doc) {
78
- utils.OnHover.create(doc, "div[id^=vf][data-id]", (e) => {
79
- const target = e;
80
- const thumb = target.closest("[data-id]");
81
- const id = thumb?.getAttribute("data-id");
82
- show_video_prev(id);
83
- });
84
- }
85
-
86
- })(core, utils);
25
+ (function(___core, ___utils) {
26
+ "use strict";
27
+ var _unsafeWindow = (() => typeof unsafeWindow != "undefined" ? unsafeWindow : void 0)();
28
+ new ___core.Rules({
29
+ paginationStrategyOptions: {
30
+ paginationSelector: ".numlist2",
31
+ overwritePaginationLast: (n, _) => n === 9 ? 9999 : n
32
+ },
33
+ thumbs: { selector: "div[id^=vf][data-id]" },
34
+ thumb: { selectors: {
35
+ title: "a[href*=video-]",
36
+ uploader: "[title=\"Uploader\"]",
37
+ duration: "[title=\"Duration\"]",
38
+ views: {
39
+ selector: "[title=\"Views\"]",
40
+ type: "float"
41
+ },
42
+ quality: {
43
+ selector: "[title=\"Quality\"]",
44
+ type: "number"
45
+ }
46
+ } },
47
+ thumbImg: {
48
+ strategy: "auto",
49
+ remove: "auto"
50
+ },
51
+ containerSelectorLast: "#vidresults",
52
+ customDataFilterFns: [{ qualityFilter: {
53
+ handle(el, state) {
54
+ if (!(state.quality360 || state.quality480 || state.quality720 || state.quality1080 || state.quality2k || state.quality4k)) return false;
55
+ return !(state.quality360 && el.quality === 360 || state.quality480 && el.quality === 480 || state.quality720 && el.quality === 720 || state.quality1080 && el.quality === 1080 || state.quality2k && el.quality === 2 || state.quality4k && el.quality === 4);
56
+ },
57
+ deps: [
58
+ "quality360",
59
+ "quality480",
60
+ "quality720",
61
+ "quality1080",
62
+ "quality2k",
63
+ "quality4k"
64
+ ]
65
+ } }],
66
+ schemeOptions: [
67
+ "Title Filter",
68
+ "Uploader Filter",
69
+ "Duration Filter",
70
+ {
71
+ title: "Quality Filter ",
72
+ content: [
73
+ { quality360: false },
74
+ { quality480: false },
75
+ { quality720: false },
76
+ { quality1080: false },
77
+ { quality2k: false },
78
+ { quality4k: false }
79
+ ]
80
+ },
81
+ "Sort By",
82
+ "Badge",
83
+ "Advanced"
84
+ ],
85
+ gropeStrategy: "all-in-one",
86
+ animatePreview
87
+ });
88
+ function animatePreview(doc) {
89
+ ___utils.OnHover.create(doc, "div[id^=vf][data-id]", (e) => {
90
+ const thumb = e.closest("[data-id]");
91
+ _unsafeWindow.EP.thumbs.preview.start(thumb);
92
+ });
93
+ }
94
+ })(___core, ___utils);
@@ -1,105 +1,100 @@
1
1
  // ==UserScript==
2
2
  // @name Erome PervertMonkey
3
3
  // @namespace pervertmonkey
4
- // @version 5.0.19
4
+ // @version 5.0.21
5
5
  // @author violent-orangutan
6
6
  // @description Infinite scroll [optional], Filter by Title, Uploader and Video/Photo albums, Sort by Views. Show/Hide Photos in album. Remove disclaimer. Restore Search Bar
7
7
  // @license MIT
8
8
  // @icon https://www.google.com/s2/favicons?sz=64&domain=erome.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 *://*.erome.com/*
14
- // @require https://cdn.jsdelivr.net/npm/pervert-monkey@1.0.24/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
- var _GM_addStyle = (() => typeof GM_addStyle != "undefined" ? GM_addStyle : undefined)();
25
- var _unsafeWindow = (() => typeof unsafeWindow != "undefined" ? unsafeWindow : undefined)();
26
23
 
27
- const $ = _unsafeWindow.$;
28
- const rules = new core.Rules({
29
- containerSelector: "#albums",
30
- gropeStrategy: "all-in-one",
31
- thumbs: {
32
- selector: "div[id^=album-]"
33
- },
34
- thumb: {
35
- selectors: {
36
- title: ".album-title",
37
- uploader: ".album-user",
38
- videoAlbum: { selector: ".album-videos", type: "boolean" },
39
- views: { selector: ".album-bottom-views", type: "float" }
40
- }
41
- },
42
- storeOptions: { showPhotos: true },
43
- customDataFilterFns: [
44
- { filterPhotoAlbums: (el, state) => !!state.filterPhotoAlbums && !el.videoAlbum },
45
- { filterVideoAlbums: (el, state) => !!state.filterVideoAlbums && !!el.videoAlbum }
46
- ],
47
- schemeOptions: [
48
- "Title Filter",
49
- "Uploader Filter",
50
- {
51
- title: "Filter Albums",
52
- content: [
53
- {
54
- filterVideoAlbums: false,
55
- label: "photo"
56
- },
57
- {
58
- filterPhotoAlbums: false,
59
- label: "video"
60
- }
61
- ]
62
- },
63
- "Sort By Views",
64
- "Badge",
65
- "Advanced"
66
- ],
67
- containMutationEnabled: false
68
- });
69
- _GM_addStyle(`
24
+ (function(___core) {
25
+ "use strict";
26
+ var _GM_addStyle = (() => typeof GM_addStyle != "undefined" ? GM_addStyle : void 0)();
27
+ var $ = (() => typeof unsafeWindow != "undefined" ? unsafeWindow : void 0)().$;
28
+ var rules = new ___core.Rules({
29
+ containerSelector: "#albums",
30
+ gropeStrategy: "all-in-one",
31
+ thumbs: { selector: "div[id^=album-]" },
32
+ thumb: { selectors: {
33
+ title: ".album-title",
34
+ uploader: ".album-user",
35
+ videoAlbum: {
36
+ selector: ".album-videos",
37
+ type: "boolean"
38
+ },
39
+ views: {
40
+ selector: ".album-bottom-views",
41
+ type: "float"
42
+ }
43
+ } },
44
+ storeOptions: { showPhotos: true },
45
+ customDataFilterFns: [{ filterPhotoAlbums: (el, state) => !!state.filterPhotoAlbums && !el.videoAlbum }, { filterVideoAlbums: (el, state) => !!state.filterVideoAlbums && !!el.videoAlbum }],
46
+ schemeOptions: [
47
+ "Title Filter",
48
+ "Uploader Filter",
49
+ {
50
+ title: "Filter Albums",
51
+ content: [{
52
+ filterVideoAlbums: false,
53
+ label: "photo"
54
+ }, {
55
+ filterPhotoAlbums: false,
56
+ label: "video"
57
+ }]
58
+ },
59
+ "Sort By Views",
60
+ "Badge",
61
+ "Advanced"
62
+ ],
63
+ containMutationEnabled: false
64
+ });
65
+ _GM_addStyle(`
70
66
  .inactive-gm { background: #a09f9d; }
71
67
  .active-gm { background: #eb6395 !important; }
72
68
  `);
73
- (function disableDisclaimer() {
74
- if (!$("#disclaimer").length) return;
75
- $.ajax({ type: "POST", url: "/user/disclaimer", async: true });
76
- $("#disclaimer").remove();
77
- $("body").css("overflow", "visible");
78
- })();
79
- const IS_ALBUM_PAGE = /^\/a\//.test(window.location.pathname);
80
- function togglePhotoElements() {
81
- $(".media-group > div:last-child:not(.video)").toggle(rules.store.state.showPhotos);
82
- $("#togglePhotos").toggleClass("active-gm", rules.store.state.showPhotos);
83
- $("#togglePhotos").text(!rules.store.state.showPhotos ? "show photos" : "hide photos");
84
- }
85
- function setupAlbumPage() {
86
- $("#user_name").parent().append(
87
- '<button id="togglePhotos" class="btn btn-pink inactive-gm">show/hide photos</button>'
88
- );
89
- $("#togglePhotos").on("click", () => {
90
- rules.store.state.showPhotos = !rules.store.state.showPhotos;
91
- });
92
- rules.store.stateSubject.subscribe(() => {
93
- togglePhotoElements();
94
- });
95
- togglePhotoElements();
96
- }
97
- if (IS_ALBUM_PAGE) {
98
- setupAlbumPage();
99
- }
100
- (function restoreSearchBar() {
101
- $('[aria-label="Search"]').click(() => $("#searchModal").show());
102
- $("#searchModal .close").click(() => $("#searchModal").hide());
103
- })();
104
-
105
- })(core);
69
+ (function disableDisclaimer() {
70
+ if (!$("#disclaimer").length) return;
71
+ $.ajax({
72
+ type: "POST",
73
+ url: "/user/disclaimer",
74
+ async: true
75
+ });
76
+ $("#disclaimer").remove();
77
+ $("body").css("overflow", "visible");
78
+ })();
79
+ var IS_ALBUM_PAGE = /^\/a\//.test(window.location.pathname);
80
+ function togglePhotoElements() {
81
+ $(".media-group > div:last-child:not(.video)").toggle(rules.store.state.showPhotos);
82
+ $("#togglePhotos").toggleClass("active-gm", rules.store.state.showPhotos);
83
+ $("#togglePhotos").text(!rules.store.state.showPhotos ? "show photos" : "hide photos");
84
+ }
85
+ function setupAlbumPage() {
86
+ $("#user_name").parent().append("<button id=\"togglePhotos\" class=\"btn btn-pink inactive-gm\">show/hide photos</button>");
87
+ $("#togglePhotos").on("click", () => {
88
+ rules.store.state.showPhotos = !rules.store.state.showPhotos;
89
+ });
90
+ rules.store.stateSubject.subscribe(() => {
91
+ togglePhotoElements();
92
+ });
93
+ togglePhotoElements();
94
+ }
95
+ if (IS_ALBUM_PAGE) setupAlbumPage();
96
+ (function restoreSearchBar() {
97
+ $("[aria-label=\"Search\"]").click(() => $("#searchModal").show());
98
+ $("#searchModal .close").click(() => $("#searchModal").hide());
99
+ })();
100
+ })(___core);