billy-herrington-utils 2.0.0 → 2.0.2
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.
- package/dist/billy-herrington-utils.es.js +13 -12
- package/dist/billy-herrington-utils.es.js.map +1 -1
- package/dist/billy-herrington-utils.umd.js +13 -12
- package/dist/billy-herrington-utils.umd.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/package.json +1 -1
- package/src/userscripts/pagination-parsing/pagination-strategies/PaginationStrategyPathnameParams.ts +1 -0
- package/src/userscripts/pagination-parsing/pagination-utils/index.ts +2 -1
- package/src/userscripts/rules/index.ts +9 -8
|
@@ -6109,7 +6109,8 @@ class RulesGlobal {
|
|
|
6109
6109
|
__publicField(this, "intersectionObservable");
|
|
6110
6110
|
__publicField(this, "thumbsSelector", ".thumb");
|
|
6111
6111
|
__publicField(this, "getThumbsStrategy", "default");
|
|
6112
|
-
__publicField(this, "
|
|
6112
|
+
__publicField(this, "paginationStrategyOptions", {});
|
|
6113
|
+
__publicField(this, "paginationStrategy", getPaginationStrategy(this.paginationStrategyOptions));
|
|
6113
6114
|
__publicField(this, "mutationObservers", []);
|
|
6114
6115
|
__publicField(this, "resetOnPaginationOrContainerDeath", true);
|
|
6115
6116
|
__publicField(this, "customSelectors", {});
|
|
@@ -6122,18 +6123,9 @@ class RulesGlobal {
|
|
|
6122
6123
|
__publicField(this, "gui", new ju(this.scheme, this.store));
|
|
6123
6124
|
__publicField(this, "dataManager", new DataManager(this, this.store.state));
|
|
6124
6125
|
__publicField(this, "infiniteScroller");
|
|
6125
|
-
__publicField(this, "resetInfiniteScroller", () => {
|
|
6126
|
-
this.infiniteScroller?.dispose();
|
|
6127
|
-
const infiniteScroller = InfiniteScroller.create(
|
|
6128
|
-
this.store,
|
|
6129
|
-
this,
|
|
6130
|
-
this.dataManager.parseData
|
|
6131
|
-
);
|
|
6132
|
-
return infiniteScroller;
|
|
6133
|
-
});
|
|
6134
6126
|
__publicField(this, "initialGrope");
|
|
6135
6127
|
this.store.subscribe(() => this.dataManager.applyFilters());
|
|
6136
|
-
this.
|
|
6128
|
+
this.resetInfiniteScroller();
|
|
6137
6129
|
this.resetOn();
|
|
6138
6130
|
this.animatePreview?.();
|
|
6139
6131
|
this.gropeInit();
|
|
@@ -6221,7 +6213,7 @@ class RulesGlobal {
|
|
|
6221
6213
|
this.mutationObservers.forEach((o) => {
|
|
6222
6214
|
o.disconnect();
|
|
6223
6215
|
});
|
|
6224
|
-
this.
|
|
6216
|
+
this.resetInfiniteScroller();
|
|
6225
6217
|
this.resetOn();
|
|
6226
6218
|
}
|
|
6227
6219
|
resetOn() {
|
|
@@ -6237,6 +6229,15 @@ class RulesGlobal {
|
|
|
6237
6229
|
this.mutationObservers.push(observer);
|
|
6238
6230
|
});
|
|
6239
6231
|
}
|
|
6232
|
+
resetInfiniteScroller() {
|
|
6233
|
+
this.infiniteScroller?.dispose();
|
|
6234
|
+
if (!this.paginationStrategy.hasPagination) return;
|
|
6235
|
+
this.infiniteScroller = InfiniteScroller.create(
|
|
6236
|
+
this.store,
|
|
6237
|
+
this,
|
|
6238
|
+
this.dataManager.parseData
|
|
6239
|
+
);
|
|
6240
|
+
}
|
|
6240
6241
|
gropeInit() {
|
|
6241
6242
|
if (!this.initialGrope) return;
|
|
6242
6243
|
if (this.initialGrope === "all-in-one") {
|