@vacantthinker/firefox-addon-framework-easy 2026.623.1422 → 2026.624.1000
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/README.md +0 -3
- package/dist/serviceGet.d.ts +11 -2
- package/dist/serviceGet.d.ts.map +1 -1
- package/dist/serviceGet.js +27 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -12,7 +12,4 @@ According to the terms of the AGPL-3.0, the source code for this network service
|
|
|
12
12
|
|
|
13
13
|
You can download, clone, or view the complete source code for this application here: [Insert your GitHub/GitLab URL].
|
|
14
14
|
|
|
15
|
-
## API Reference (Auto-Generated)
|
|
16
|
-
|
|
17
|
-
Below is a list of all public functions found inside the `src` directory:
|
|
18
15
|
|
package/dist/serviceGet.d.ts
CHANGED
|
@@ -12,10 +12,19 @@ interface URLBase {
|
|
|
12
12
|
export declare function serviceParseURLBase(targetUrl: string): URLBase | undefined;
|
|
13
13
|
export declare function serviceParseURL(targetUrl: string): URL | undefined;
|
|
14
14
|
/**
|
|
15
|
-
* Generates a timestamp string in the format:
|
|
16
|
-
* e.g., 2026_6_11_10h_30m_15s_450
|
|
15
|
+
* Generates a timestamp string in the format:
|
|
16
|
+
* YYYY_M_D_Hh_Mm_Ss_ms e.g., 2026_6_11_10h_30m_15s_450
|
|
17
17
|
* @returns The formatted timestamp string.
|
|
18
18
|
*/
|
|
19
19
|
export declare function serviceGetCurrentDateYYYYMMDDHHMMSS(): string;
|
|
20
|
+
/**
|
|
21
|
+
* Truncates a title to a safe length and appends the .mp4
|
|
22
|
+
* extension.
|
|
23
|
+
*/
|
|
24
|
+
export declare function serviceTitleToFilenameLimit(title: string | undefined): string | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Appends the .mp4 extension to a given string.
|
|
27
|
+
*/
|
|
28
|
+
export declare function serviceAppendExtMP4(title: string | undefined): string | undefined;
|
|
20
29
|
export {};
|
|
21
30
|
//# sourceMappingURL=serviceGet.d.ts.map
|
package/dist/serviceGet.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serviceGet.d.ts","sourceRoot":"","sources":["../src/serviceGet.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,sBAKjD;AAED,UAAU,OAAO;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,eAAe,CAAC;CAC/B;AAED,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CASxC;AAED,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,mBAGhD;AAED;;;;GAIG;AACH,wBAAgB,mCAAmC,IAAI,MAAM,CAY5D"}
|
|
1
|
+
{"version":3,"file":"serviceGet.d.ts","sourceRoot":"","sources":["../src/serviceGet.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,sBAKjD;AAED,UAAU,OAAO;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,eAAe,CAAC;CAC/B;AAED,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CASxC;AAED,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,mBAGhD;AAED;;;;GAIG;AACH,wBAAgB,mCAAmC,IAAI,MAAM,CAY5D;AAGD;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAQ/C;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAQ/C"}
|
package/dist/serviceGet.js
CHANGED
|
@@ -29,8 +29,8 @@ export function serviceParseURL(targetUrl) {
|
|
|
29
29
|
return new URL(targetUrl);
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
|
-
* Generates a timestamp string in the format:
|
|
33
|
-
* e.g., 2026_6_11_10h_30m_15s_450
|
|
32
|
+
* Generates a timestamp string in the format:
|
|
33
|
+
* YYYY_M_D_Hh_Mm_Ss_ms e.g., 2026_6_11_10h_30m_15s_450
|
|
34
34
|
* @returns The formatted timestamp string.
|
|
35
35
|
*/
|
|
36
36
|
export function serviceGetCurrentDateYYYYMMDDHHMMSS() {
|
|
@@ -44,3 +44,28 @@ export function serviceGetCurrentDateYYYYMMDDHHMMSS() {
|
|
|
44
44
|
const milliseconds = date.getMilliseconds();
|
|
45
45
|
return `${year}_${month}_${day}_${hours}h_${minutes}m_${seconds}s_${milliseconds}`;
|
|
46
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* Truncates a title to a safe length and appends the .mp4
|
|
49
|
+
* extension.
|
|
50
|
+
*/
|
|
51
|
+
export function serviceTitleToFilenameLimit(title) {
|
|
52
|
+
if (!title)
|
|
53
|
+
return undefined;
|
|
54
|
+
const MAX_FILENAME_LENGTH = 50;
|
|
55
|
+
// .slice() safely handles strings shorter than
|
|
56
|
+
// MAX_FILENAME_LENGTH without throwing errors
|
|
57
|
+
const truncatedTitle = title.slice(0, MAX_FILENAME_LENGTH);
|
|
58
|
+
return serviceAppendExtMP4(truncatedTitle);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Appends the .mp4 extension to a given string.
|
|
62
|
+
*/
|
|
63
|
+
export function serviceAppendExtMP4(title) {
|
|
64
|
+
if (!title)
|
|
65
|
+
return undefined;
|
|
66
|
+
// Prevents duplicating the extension if it's already there
|
|
67
|
+
let extMP4 = '.mp4';
|
|
68
|
+
if (title.toLowerCase().endsWith(extMP4))
|
|
69
|
+
return title;
|
|
70
|
+
return `${title}${extMP4}`;
|
|
71
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vacantthinker/firefox-addon-framework-easy",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.0624.1000",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
16
|
"install_package": "npm install",
|
|
17
|
-
"build_ts": "tsc"
|
|
17
|
+
"build_ts": "rm -rf dist && npx tsc"
|
|
18
18
|
},
|
|
19
19
|
"author": "VacantThinker",
|
|
20
20
|
"license": "AGPL-3.0-only",
|