pervert-monkey 1.0.19 → 1.0.20

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 (50) hide show
  1. package/README.md +4 -4
  2. package/dist/core/pervertmonkey.core.es.d.ts +4 -4
  3. package/dist/core/pervertmonkey.core.es.js +9 -11
  4. package/dist/core/pervertmonkey.core.es.js.map +1 -1
  5. package/dist/core/pervertmonkey.core.umd.js +9 -11
  6. package/dist/core/pervertmonkey.core.umd.js.map +1 -1
  7. package/dist/userscripts/3hentai.user.js +2 -2
  8. package/dist/userscripts/camgirlfinder.user.js +2 -2
  9. package/dist/userscripts/camwhores.user.js +2 -2
  10. package/dist/userscripts/e-hentai.user.js +2 -2
  11. package/dist/userscripts/ebalka.user.js +2 -2
  12. package/dist/userscripts/eporner.user.js +2 -2
  13. package/dist/userscripts/erome.user.js +2 -2
  14. package/dist/userscripts/eroprofile.user.js +2 -2
  15. package/dist/userscripts/javhdporn.user.js +2 -2
  16. package/dist/userscripts/missav.user.js +2 -2
  17. package/dist/userscripts/motherless.user.js +2 -2
  18. package/dist/userscripts/namethatporn.user.js +2 -2
  19. package/dist/userscripts/nhentai.user.js +2 -2
  20. package/dist/userscripts/obmenvsem.user.js +2 -2
  21. package/dist/userscripts/pornhub.user.js +3 -3
  22. package/dist/userscripts/spankbang.user.js +2 -2
  23. package/dist/userscripts/thisvid.user.js +2 -2
  24. package/dist/userscripts/xhamster.user.js +2 -2
  25. package/dist/userscripts/xvideos.user.js +2 -2
  26. package/package.json +1 -1
  27. package/src/core/data-handler/data-manager.ts +5 -5
  28. package/src/core/parsers/thumb-data-parser.ts +1 -1
  29. package/src/core/rules/index.ts +4 -4
  30. package/src/userscripts/index.ts +1 -1
  31. package/src/userscripts/scripts/3hentai.ts +1 -1
  32. package/src/userscripts/scripts/camgirlfinder.ts +1 -1
  33. package/src/userscripts/scripts/camwhores.ts +1 -1
  34. package/src/userscripts/scripts/e-hentai.ts +1 -1
  35. package/src/userscripts/scripts/ebalka.ts +1 -1
  36. package/src/userscripts/scripts/eporner.ts +1 -1
  37. package/src/userscripts/scripts/erome.ts +1 -1
  38. package/src/userscripts/scripts/eroprofile.ts +1 -1
  39. package/src/userscripts/scripts/javhdporn.ts +1 -1
  40. package/src/userscripts/scripts/missav.ts +1 -1
  41. package/src/userscripts/scripts/motherless.ts +1 -1
  42. package/src/userscripts/scripts/namethatporn.ts +1 -1
  43. package/src/userscripts/scripts/nhentai.ts +1 -1
  44. package/src/userscripts/scripts/obmenvsem.ts +1 -1
  45. package/src/userscripts/scripts/pornhub.ts +3 -3
  46. package/src/userscripts/scripts/spankbang.ts +1 -1
  47. package/src/userscripts/scripts/thisvid.ts +1 -1
  48. package/src/userscripts/scripts/xhamster.ts +1 -1
  49. package/src/userscripts/scripts/xvideos.ts +1 -1
  50. package/src/utils/dom/index.ts +3 -5
@@ -240,11 +240,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
240
240
  if (e.parentElement) return findNextSibling(e.parentElement);
241
241
  return null;
242
242
  }
243
- function checkHomogenity(a2, b2, options) {
243
+ function areElementsAlike(a2, b2, options) {
244
244
  if (!a2 || !b2) return false;
245
- if (options.id) {
246
- if (a2.id !== b2.id) return false;
247
- }
245
+ if (options.id && a2.id !== b2.id) return false;
248
246
  if (options.className) {
249
247
  const ca2 = a2.className;
250
248
  const cb = b2.className;
@@ -651,12 +649,12 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
651
649
  const homogenity = !!this.containerHomogenity;
652
650
  for (const thumbElement of thumbs) {
653
651
  const url = this.rules.thumbDataParser.getUrl(thumbElement);
654
- const isHomogenic = homogenity && !checkHomogenity(
652
+ const isNotHomogenic = homogenity && !areElementsAlike(
655
653
  parent,
656
654
  thumbElement.parentElement,
657
655
  this.containerHomogenity
658
656
  );
659
- if (!url || this.data.has(url) || parent !== container && (parent == null ? void 0 : parent.contains(thumbElement)) || isHomogenic) {
657
+ if (!url || this.data.has(url) || parent !== container && (parent == null ? void 0 : parent.contains(thumbElement)) || isNotHomogenic) {
660
658
  if (removeDuplicates) thumbElement.remove();
661
659
  continue;
662
660
  }
@@ -3081,7 +3079,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
3081
3079
  return { title, duration };
3082
3080
  }
3083
3081
  getUrl(thumb) {
3084
- return (thumb.querySelector("a[href]") || thumb).href;
3082
+ return querySelectorOrSelf(thumb, "a[href]").href;
3085
3083
  }
3086
3084
  preprocessCustomThumbDataSelectors() {
3087
3085
  if (!this.selectors) return;
@@ -9864,12 +9862,12 @@ Expected function or array of functions, received type ${typeof t}.`
9864
9862
  }
9865
9863
  class Rules {
9866
9864
  constructor(options) {
9865
+ __publicField(this, "thumbs", {});
9866
+ __publicField(this, "thumbsParser");
9867
9867
  __publicField(this, "thumb", {});
9868
9868
  __publicField(this, "thumbDataParser");
9869
9869
  __publicField(this, "thumbImg", {});
9870
9870
  __publicField(this, "thumbImgParser");
9871
- __publicField(this, "thumbs", {});
9872
- __publicField(this, "thumbsParser");
9873
9871
  __publicField(this, "containerSelector", ".container");
9874
9872
  __publicField(this, "containerSelectorLast");
9875
9873
  __publicField(this, "intersectionObservableSelector");
@@ -9893,9 +9891,9 @@ Expected function or array of functions, received type ${typeof t}.`
9893
9891
  __publicField(this, "onResetCallback");
9894
9892
  if (this.isEmbedded) throw Error("Embedded is not supported");
9895
9893
  Object.assign(this, options);
9894
+ this.thumbsParser = ThumbsParser.create(this.thumbs);
9896
9895
  this.thumbDataParser = ThumbDataParser.create(this.thumb);
9897
9896
  this.thumbImgParser = ThumbImgParser.create(this.thumbImg);
9898
- this.thumbsParser = ThumbsParser.create(this.thumbs);
9899
9897
  this.paginationStrategy = getPaginationStrategy(this.paginationStrategyOptions);
9900
9898
  this.store = this.createStore();
9901
9899
  this.gui = this.createGui();
@@ -10008,7 +10006,7 @@ Expected function or array of functions, received type ${typeof t}.`
10008
10006
  exports2.ThumbImgParser = ThumbImgParser;
10009
10007
  exports2.ThumbsParser = ThumbsParser;
10010
10008
  exports2.Tick = Tick;
10011
- exports2.checkHomogenity = checkHomogenity;
10009
+ exports2.areElementsAlike = areElementsAlike;
10012
10010
  exports2.chunks = chunks;
10013
10011
  exports2.circularShift = circularShift;
10014
10012
  exports2.containMutation = containMutation;