pervert-monkey 1.0.12 → 1.0.13
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/core/pervertmonkey.core.es.d.ts +3 -1
- package/dist/core/pervertmonkey.core.es.js +19 -1
- package/dist/core/pervertmonkey.core.es.js.map +1 -1
- package/dist/core/pervertmonkey.core.umd.js +19 -1
- package/dist/core/pervertmonkey.core.umd.js.map +1 -1
- package/dist/userscripts/3hentai.user.js +1 -1
- package/dist/userscripts/camgirlfinder.user.js +1 -1
- package/dist/userscripts/camwhores.user.js +1 -1
- package/dist/userscripts/e-hentai.user.js +1 -1
- package/dist/userscripts/ebalka.user.js +1 -1
- package/dist/userscripts/eporner.user.js +1 -1
- package/dist/userscripts/erome.user.js +1 -1
- package/dist/userscripts/eroprofile.user.js +1 -1
- package/dist/userscripts/javhdporn.user.js +1 -1
- package/dist/userscripts/missav.user.js +1 -1
- package/dist/userscripts/motherless.user.js +4 -3
- package/dist/userscripts/namethatporn.user.js +1 -1
- package/dist/userscripts/nhentai.user.js +1 -1
- package/dist/userscripts/obmenvsem.user.js +1 -1
- package/dist/userscripts/pornhub.user.js +1 -1
- package/dist/userscripts/spankbang.user.js +1 -1
- package/dist/userscripts/thisvid.user.js +1 -1
- package/dist/userscripts/xhamster.user.js +5 -12
- package/dist/userscripts/xvideos.user.js +2 -2
- package/package.json +1 -1
- package/src/core/jabroni-config/jabroni-gui-controller.ts +1 -0
- package/src/core/parsers/thumb-data-parser.ts +6 -1
- package/src/userscripts/index.ts +1 -1
- package/src/userscripts/scripts/eroprofile.ts +2 -2
- package/src/userscripts/scripts/motherless.ts +2 -1
- package/src/userscripts/scripts/xhamster.ts +6 -4
- package/src/userscripts/scripts/xvideos.ts +1 -1
- package/src/utils/parsers/index.ts +16 -0
|
@@ -323,11 +323,13 @@ export declare function parseHtml(html: string): HTMLElement;
|
|
|
323
323
|
|
|
324
324
|
export declare function parseIntegerOr(n: string | number, or: number): number;
|
|
325
325
|
|
|
326
|
+
export declare function parseNumberWithLetter(str: string): number;
|
|
327
|
+
|
|
326
328
|
export declare function parseUrl(s: HTMLAnchorElement | Location | URL | string): URL;
|
|
327
329
|
|
|
328
330
|
declare type Primitive = string | number | boolean;
|
|
329
331
|
|
|
330
|
-
declare type PrimitiveString = 'boolean' | 'string' | 'number' | 'duration';
|
|
332
|
+
declare type PrimitiveString = 'boolean' | 'string' | 'number' | 'float' | 'duration';
|
|
331
333
|
|
|
332
334
|
export declare function querySelectorLast<T extends Element = HTMLElement>(root: ParentNode | undefined, selector: string): T | undefined;
|
|
333
335
|
|
|
@@ -394,6 +394,18 @@ function parseIntegerOr(n, or2) {
|
|
|
394
394
|
const num = Number(n);
|
|
395
395
|
return Number.isSafeInteger(num) ? num : or2;
|
|
396
396
|
}
|
|
397
|
+
function parseNumberWithLetter(str) {
|
|
398
|
+
var _a3;
|
|
399
|
+
const multipliers = { k: 1e3, m: 1e6 };
|
|
400
|
+
const match = str.trim().match(/^([\d.]+)(\w)?$/);
|
|
401
|
+
if (!match) return 0;
|
|
402
|
+
const num = parseFloat(match[1]);
|
|
403
|
+
const suffix = (_a3 = match[2]) == null ? void 0 : _a3.toLowerCase();
|
|
404
|
+
if (suffix && suffix in multipliers) {
|
|
405
|
+
return num * multipliers[suffix];
|
|
406
|
+
}
|
|
407
|
+
return num;
|
|
408
|
+
}
|
|
397
409
|
function parseDataParams(str) {
|
|
398
410
|
const paramsStr = decodeURI(str.trim()).split(";");
|
|
399
411
|
return paramsStr.reduce(
|
|
@@ -3037,6 +3049,10 @@ class ThumbDataParser {
|
|
|
3037
3049
|
if (type === "duration") {
|
|
3038
3050
|
return timeToSeconds(querySelectorText(thumb, selector));
|
|
3039
3051
|
}
|
|
3052
|
+
if (type === "float") {
|
|
3053
|
+
const value = querySelectorText(thumb, selector);
|
|
3054
|
+
return parseNumberWithLetter(value);
|
|
3055
|
+
}
|
|
3040
3056
|
return Number.parseInt(querySelectorText(thumb, selector));
|
|
3041
3057
|
}
|
|
3042
3058
|
static create(o = {}) {
|
|
@@ -9694,7 +9710,8 @@ class JabronioGuiController {
|
|
|
9694
9710
|
__publicField(this, "destroy$", new Subject());
|
|
9695
9711
|
__publicField(this, "directionalEventObservable$");
|
|
9696
9712
|
__publicField(this, "eventsMap", {
|
|
9697
|
-
"sort by duration": (direction) => this.dataManager.sortBy("duration", direction)
|
|
9713
|
+
"sort by duration": (direction) => this.dataManager.sortBy("duration", direction),
|
|
9714
|
+
"sort by views": (direction) => this.dataManager.sortBy("views", direction)
|
|
9698
9715
|
});
|
|
9699
9716
|
this.store = store;
|
|
9700
9717
|
this.dataManager = dataManager;
|
|
@@ -9896,6 +9913,7 @@ export {
|
|
|
9896
9913
|
parseDataParams,
|
|
9897
9914
|
parseHtml,
|
|
9898
9915
|
parseIntegerOr,
|
|
9916
|
+
parseNumberWithLetter,
|
|
9899
9917
|
parseUrl,
|
|
9900
9918
|
querySelectorLast,
|
|
9901
9919
|
querySelectorLastNumber,
|