pervert-monkey 1.0.20 → 1.0.21

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 (47) hide show
  1. package/dist/core/pervertmonkey.core.es.d.ts +2 -0
  2. package/dist/core/pervertmonkey.core.es.js +11 -3
  3. package/dist/core/pervertmonkey.core.es.js.map +1 -1
  4. package/dist/core/pervertmonkey.core.umd.js +11 -3
  5. package/dist/core/pervertmonkey.core.umd.js.map +1 -1
  6. package/dist/userscripts/3hentai.user.js +2 -2
  7. package/dist/userscripts/camgirlfinder.user.js +2 -2
  8. package/dist/userscripts/camwhores.user.js +2 -2
  9. package/dist/userscripts/e-hentai.user.js +2 -2
  10. package/dist/userscripts/ebalka.user.js +2 -2
  11. package/dist/userscripts/eporner.user.js +2 -2
  12. package/dist/userscripts/erome.user.js +4 -6
  13. package/dist/userscripts/eroprofile.user.js +2 -2
  14. package/dist/userscripts/javhdporn.user.js +2 -2
  15. package/dist/userscripts/missav.user.js +2 -2
  16. package/dist/userscripts/motherless.user.js +2 -2
  17. package/dist/userscripts/namethatporn.user.js +2 -2
  18. package/dist/userscripts/nhentai.user.js +2 -2
  19. package/dist/userscripts/obmenvsem.user.js +2 -2
  20. package/dist/userscripts/pornhub.user.js +2 -2
  21. package/dist/userscripts/spankbang.user.js +2 -2
  22. package/dist/userscripts/thisvid.user.js +2 -2
  23. package/dist/userscripts/xhamster.user.js +2 -2
  24. package/dist/userscripts/xvideos.user.js +2 -2
  25. package/package.json +1 -1
  26. package/src/core/data-handler/data-manager.ts +11 -3
  27. package/src/core/rules/index.ts +2 -0
  28. package/src/userscripts/index.ts +1 -1
  29. package/src/userscripts/scripts/3hentai.ts +1 -1
  30. package/src/userscripts/scripts/camgirlfinder.ts +1 -1
  31. package/src/userscripts/scripts/camwhores.ts +1 -1
  32. package/src/userscripts/scripts/e-hentai.ts +1 -1
  33. package/src/userscripts/scripts/ebalka.ts +1 -1
  34. package/src/userscripts/scripts/eporner.ts +1 -1
  35. package/src/userscripts/scripts/erome.ts +2 -6
  36. package/src/userscripts/scripts/eroprofile.ts +1 -1
  37. package/src/userscripts/scripts/javhdporn.ts +1 -1
  38. package/src/userscripts/scripts/missav.ts +1 -1
  39. package/src/userscripts/scripts/motherless.ts +1 -1
  40. package/src/userscripts/scripts/namethatporn.ts +1 -1
  41. package/src/userscripts/scripts/nhentai.ts +1 -1
  42. package/src/userscripts/scripts/obmenvsem.ts +1 -1
  43. package/src/userscripts/scripts/pornhub.ts +1 -1
  44. package/src/userscripts/scripts/spankbang.ts +1 -1
  45. package/src/userscripts/scripts/thisvid.ts +1 -1
  46. package/src/userscripts/scripts/xhamster.ts +1 -1
  47. package/src/userscripts/scripts/xvideos.ts +1 -1
@@ -629,7 +629,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
629
629
  f();
630
630
  } else {
631
631
  requestAnimationFrame(() => {
632
- containMutation(parent, f);
632
+ this.optimize(parent, f);
633
633
  });
634
634
  }
635
635
  });
@@ -668,7 +668,14 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
668
668
  }
669
669
  await this.filterAll(dataOffset);
670
670
  if (!parent) return;
671
- containMutation(parent, () => parent == null ? void 0 : parent.appendChild(fragment));
671
+ this.optimize(parent, () => parent == null ? void 0 : parent.appendChild(fragment));
672
+ }
673
+ optimize(container, mutation) {
674
+ if (this.rules.containMutationEnabled) {
675
+ containMutation(container, mutation);
676
+ } else {
677
+ mutation();
678
+ }
672
679
  }
673
680
  sortBy(key, direction = true) {
674
681
  if (this.data.size < 2) return;
@@ -678,7 +685,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
678
685
  for (const [container, items] of byContainers) {
679
686
  items.sort((a2, b2) => (a2[key] - b2[key]) * dir);
680
687
  const children = items.map((e) => e.element);
681
- containMutation(container, () => container.replaceChildren(...children));
688
+ this.optimize(container, () => container.replaceChildren(...children));
682
689
  }
683
690
  }
684
691
  }
@@ -9886,6 +9893,7 @@ Expected function or array of functions, received type ${typeof t}.`
9886
9893
  __publicField(this, "infiniteScroller");
9887
9894
  __publicField(this, "getPaginationData");
9888
9895
  __publicField(this, "gropeStrategy", "all-in-one");
9896
+ __publicField(this, "containMutationEnabled", true);
9889
9897
  __publicField(this, "mutationObservers", []);
9890
9898
  __publicField(this, "resetOnPaginationOrContainerDeath", true);
9891
9899
  __publicField(this, "onResetCallback");