@vacantthinker/firefox-addon-framework-easy 2026.613.2149 → 2026.614.840
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/browserNotification.d.ts +10 -4
- package/dist/browserNotification.d.ts.map +1 -1
- package/dist/browserNotification.js +18 -11
- package/dist/browserRuntime.d.ts +5 -0
- package/dist/browserRuntime.d.ts.map +1 -1
- package/dist/browserRuntime.js +9 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/serviceCommon.d.ts.map +1 -1
- package/dist/serviceCommon.js +4 -3
- package/dist/serviceOpJavascript.d.ts.map +1 -1
- package/dist/serviceOpJavascript.js +51 -19
- package/dist/{serviceOperationYTBURL.d.ts → serviceOperationYTB.d.ts} +3 -1
- package/dist/serviceOperationYTB.d.ts.map +1 -0
- package/dist/{serviceOperationYTBURL.js → serviceOperationYTB.js} +3 -0
- package/package.json +1 -1
- package/dist/serviceOperationYTBURL.d.ts.map +0 -1
|
@@ -1,8 +1,14 @@
|
|
|
1
|
+
export interface NotificationTwoOptions {
|
|
2
|
+
message: string;
|
|
3
|
+
title?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function browserNotificationCreateBasicMessageOnly(message: string): Promise<string>;
|
|
1
6
|
/**
|
|
2
|
-
* Creates a browser notification with basic type
|
|
3
|
-
*
|
|
4
|
-
* @param title The notification title (defaults to manifest name).
|
|
7
|
+
* Creates a browser notification with basic type,
|
|
8
|
+
* if title null use addon manifest name.
|
|
5
9
|
* @returns The notification identifier.
|
|
10
|
+
* @param notificationTwoOptions
|
|
6
11
|
*/
|
|
7
|
-
export declare function
|
|
12
|
+
export declare function browserNotificationCreateBasicMessage(notificationTwoOptions: NotificationTwoOptions): Promise<string>;
|
|
13
|
+
export declare function browserNotificationCreate(notificationOptions: browser.notifications.CreateNotificationOptions): Promise<string>;
|
|
8
14
|
//# sourceMappingURL=browserNotification.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browserNotification.d.ts","sourceRoot":"","sources":["../src/browserNotification.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"browserNotification.d.ts","sourceRoot":"","sources":["../src/browserNotification.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,yCAAyC,CAC7D,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,CAAC,CAIjB;AAED;;;;;GAKG;AACH,wBAAsB,qCAAqC,CACzD,sBAAsB,EAAE,sBAAsB,GAC7C,OAAO,CAAC,MAAM,CAAC,CAYjB;AAED,wBAAsB,yBAAyB,CAC7C,mBAAmB,EAAE,OAAO,CAAC,aAAa,CAAC,yBAAyB,GACnE,OAAO,CAAC,MAAM,CAAC,CAGjB"}
|
|
@@ -1,17 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { browserRuntimeManifestName } from './browserRuntime';
|
|
2
|
+
export async function browserNotificationCreateBasicMessageOnly(message) {
|
|
3
|
+
return await browserNotificationCreateBasicMessage({ message });
|
|
4
|
+
}
|
|
2
5
|
/**
|
|
3
|
-
* Creates a browser notification with basic type
|
|
4
|
-
*
|
|
5
|
-
* @param title The notification title (defaults to manifest name).
|
|
6
|
+
* Creates a browser notification with basic type,
|
|
7
|
+
* if title null use addon manifest name.
|
|
6
8
|
* @returns The notification identifier.
|
|
9
|
+
* @param notificationTwoOptions
|
|
7
10
|
*/
|
|
8
|
-
export async function
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
+
export async function browserNotificationCreateBasicMessage(notificationTwoOptions) {
|
|
12
|
+
const notificationOptions = {
|
|
13
|
+
message: "",
|
|
11
14
|
type: 'basic',
|
|
12
|
-
title:
|
|
13
|
-
message: content,
|
|
15
|
+
title: browserRuntimeManifestName()
|
|
14
16
|
};
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
const options = {
|
|
18
|
+
...notificationOptions, ...notificationTwoOptions
|
|
19
|
+
};
|
|
20
|
+
return await browserNotificationCreate(options);
|
|
21
|
+
}
|
|
22
|
+
export async function browserNotificationCreate(notificationOptions) {
|
|
23
|
+
return await browser.notifications.create(notificationOptions);
|
|
17
24
|
}
|
package/dist/browserRuntime.d.ts
CHANGED
|
@@ -22,6 +22,11 @@ export declare function browserRuntimeGetURL(path: string): string;
|
|
|
22
22
|
* @param path
|
|
23
23
|
*/
|
|
24
24
|
export declare function browserRuntimeGetPagesURL(path: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* `pages/${path}.html`
|
|
27
|
+
* @param path
|
|
28
|
+
*/
|
|
29
|
+
export declare function browserRuntimeGetPagesURLNoNeedExtHTML(path: string): string;
|
|
25
30
|
/**
|
|
26
31
|
* Retrieves the Gecko ID from the manifest.
|
|
27
32
|
* @returns The Gecko ID or empty string if not found.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browserRuntime.d.ts","sourceRoot":"","sources":["../src/browserRuntime.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C;AAED;;;GAGG;AACH,wBAAsB,6BAA6B,CAAC,GAAG,GAAE,MAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAEnF;AAED;;GAEG;AACH,wBAAgB,+BAA+B,IAAI,IAAI,CAGtD;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9D;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"browserRuntime.d.ts","sourceRoot":"","sources":["../src/browserRuntime.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C;AAED;;;GAGG;AACH,wBAAsB,6BAA6B,CAAC,GAAG,GAAE,MAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAEnF;AAED;;GAEG;AACH,wBAAgB,+BAA+B,IAAI,IAAI,CAGtD;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9D;AAED;;;GAGG;AACH,wBAAgB,sCAAsC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE3E;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAI9C;AAED;;;GAGG;AACH,wBAAsB,0BAA0B,IAAI,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,CAExF;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,IAAI,MAAM,CAEtD;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,IAAI,MAAM,CAEnD"}
|
package/dist/browserRuntime.js
CHANGED
|
@@ -33,13 +33,21 @@ export function browserRuntimeGetURL(path) {
|
|
|
33
33
|
export function browserRuntimeGetPagesURL(path) {
|
|
34
34
|
return browser.runtime.getURL(`pages/${path}`);
|
|
35
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* `pages/${path}.html`
|
|
38
|
+
* @param path
|
|
39
|
+
*/
|
|
40
|
+
export function browserRuntimeGetPagesURLNoNeedExtHTML(path) {
|
|
41
|
+
return browser.runtime.getURL(`pages/${path}.html`);
|
|
42
|
+
}
|
|
36
43
|
/**
|
|
37
44
|
* Retrieves the Gecko ID from the manifest.
|
|
38
45
|
* @returns The Gecko ID or empty string if not found.
|
|
39
46
|
*/
|
|
40
47
|
export function browserRuntimeGeckoId() {
|
|
41
48
|
const manifest = browser.runtime.getManifest();
|
|
42
|
-
return manifest.browser_specific_settings?.gecko?.id ??
|
|
49
|
+
return manifest.browser_specific_settings?.gecko?.id ??
|
|
50
|
+
'';
|
|
43
51
|
}
|
|
44
52
|
/**
|
|
45
53
|
* Gets information about the current platform.
|
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export * from './serviceCommon';
|
|
|
10
10
|
export * from './serviceFetch';
|
|
11
11
|
export * from './serviceGet';
|
|
12
12
|
export * from './serviceOpContent';
|
|
13
|
-
export * from './
|
|
13
|
+
export * from './serviceOperationYTB';
|
|
14
14
|
export * from './serviceOpJavascript';
|
|
15
15
|
export * from './serviceUpdateTabStyle';
|
|
16
16
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -10,6 +10,6 @@ export * from './serviceCommon';
|
|
|
10
10
|
export * from './serviceFetch';
|
|
11
11
|
export * from './serviceGet';
|
|
12
12
|
export * from './serviceOpContent';
|
|
13
|
-
export * from './
|
|
13
|
+
export * from './serviceOperationYTB';
|
|
14
14
|
export * from './serviceOpJavascript';
|
|
15
15
|
export * from './serviceUpdateTabStyle';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serviceCommon.d.ts","sourceRoot":"","sources":["../src/serviceCommon.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,EACf,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"serviceCommon.d.ts","sourceRoot":"","sources":["../src/serviceCommon.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,EACf,MAAM,mBAAmB,CAAC;AAS3B;;GAEG;AACH,wBAAsB,iBAAiB,kBAGtC;AAED;;;;GAIG;AACH,wBAAsB,yBAAyB,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAmBrF"}
|
package/dist/serviceCommon.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { browserDownloadByDownlink } from './browserDownload';
|
|
2
|
-
import {
|
|
2
|
+
import { browserNotificationCreateBasicMessageOnly } from './browserNotification';
|
|
3
3
|
import { stoOpClear } from "./opStorage";
|
|
4
4
|
import { browserRuntimeReload } from "./browserRuntime";
|
|
5
5
|
/**
|
|
@@ -19,11 +19,12 @@ export async function serviceDownloadByDownlink(params) {
|
|
|
19
19
|
try {
|
|
20
20
|
// Attempt 1: Full download with provided parameters
|
|
21
21
|
await browserDownloadByDownlink(params);
|
|
22
|
-
await
|
|
22
|
+
await browserNotificationCreateBasicMessageOnly(`downloading! ${filename ??
|
|
23
|
+
'file'}`);
|
|
23
24
|
}
|
|
24
25
|
catch (error) {
|
|
25
26
|
// Notify about the failure
|
|
26
|
-
await
|
|
27
|
+
await browserNotificationCreateBasicMessageOnly(`reason=${error}`);
|
|
27
28
|
// Attempt 2: Fallback retry using only the downlink
|
|
28
29
|
await browserDownloadByDownlink({ downlink });
|
|
29
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serviceOpJavascript.d.ts","sourceRoot":"","sources":["../src/serviceOpJavascript.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"serviceOpJavascript.d.ts","sourceRoot":"","sources":["../src/serviceOpJavascript.ts"],"names":[],"mappings":"AAaA,UAAU,UAAU;IAClB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,aAAa;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,UAAU,iBACR,SAAQ,aAAa;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,YAAY,CAAC,EAAE,WAAW,GAAG,KAAK,GAAG,iBAAiB,CAAC;CACxD;AAID;;GAEG;AACH,wBAAsB,qBAAqB,CAAC,EACE,KAAK,EACL,QAAQ,EACR,IAAI,EACL,EAAE;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,UAAU,CAAA;CACjB,GAAG,OAAO,CAAC,IAAI,CAAC,CAyBhB;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CA+HhF;AAED;;GAEG;AACH,wBAAsB,0BAA0B,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAiBtF;AAED;;GAEG;AACH,wBAAsB,wBAAwB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAwCxF;AAED;;GAEG;AACH,wBAAsB,yBAAyB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAwCzF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { serviceGetCurrentDateYYYYMMDDHHMMSS } from './serviceGet';
|
|
2
2
|
import { serviceCopyContentToClipboard, serviceRemoveIllegalWord, serviceSaveContentToLocal, } from './serviceOpContent';
|
|
3
|
-
import {
|
|
3
|
+
import { browserNotificationCreateBasicMessageOnly } from './browserNotification';
|
|
4
4
|
// --- Services ---
|
|
5
5
|
/**
|
|
6
6
|
* Captures a tab's screenshot and triggers a local download in the target tab.
|
|
@@ -9,7 +9,12 @@ export async function serviceTakeScreenshot({ tabId, filename, rect }) {
|
|
|
9
9
|
const dataURI = await browser.tabs.captureTab(tabId, { rect });
|
|
10
10
|
await browser.scripting.executeScript({
|
|
11
11
|
target: { tabId },
|
|
12
|
-
args: [
|
|
12
|
+
args: [
|
|
13
|
+
{
|
|
14
|
+
dataURI,
|
|
15
|
+
filename
|
|
16
|
+
}
|
|
17
|
+
],
|
|
13
18
|
func: (message) => {
|
|
14
19
|
const { dataURI, filename } = message;
|
|
15
20
|
const a = document.createElement('a');
|
|
@@ -45,7 +50,9 @@ export async function serviceElementPicker(message) {
|
|
|
45
50
|
function getUniqueSelector(el) {
|
|
46
51
|
const path = [];
|
|
47
52
|
let current = el;
|
|
48
|
-
while (current &&
|
|
53
|
+
while (current &&
|
|
54
|
+
current.nodeType ===
|
|
55
|
+
Node.ELEMENT_NODE) {
|
|
49
56
|
let selector = current.nodeName.toLowerCase();
|
|
50
57
|
if (current.id) {
|
|
51
58
|
selector += `#${current.id}`;
|
|
@@ -54,10 +61,14 @@ export async function serviceElementPicker(message) {
|
|
|
54
61
|
}
|
|
55
62
|
else {
|
|
56
63
|
let sib = current, nth = 1;
|
|
57
|
-
while ((sib = sib.previousElementSibling) &&
|
|
64
|
+
while ((sib = sib.previousElementSibling) &&
|
|
65
|
+
sib.nodeName.toLowerCase() ===
|
|
66
|
+
selector)
|
|
58
67
|
nth++;
|
|
59
|
-
if (nth !==
|
|
68
|
+
if (nth !==
|
|
69
|
+
1) {
|
|
60
70
|
selector += `:nth-of-type(${nth})`;
|
|
71
|
+
}
|
|
61
72
|
}
|
|
62
73
|
path.unshift(selector);
|
|
63
74
|
current = current.parentElement;
|
|
@@ -66,13 +77,18 @@ export async function serviceElementPicker(message) {
|
|
|
66
77
|
}
|
|
67
78
|
function handleMouseOver(e) {
|
|
68
79
|
const target = e.target;
|
|
69
|
-
if (target.id ===
|
|
80
|
+
if (target.id ===
|
|
81
|
+
overlayId ||
|
|
82
|
+
!overlay) {
|
|
70
83
|
return;
|
|
84
|
+
}
|
|
71
85
|
const rect = target.getBoundingClientRect();
|
|
72
86
|
Object.assign(overlay.style, {
|
|
73
87
|
display: 'block',
|
|
74
|
-
top: `${rect.top}px`,
|
|
75
|
-
|
|
88
|
+
top: `${rect.top}px`,
|
|
89
|
+
left: `${rect.left}px`,
|
|
90
|
+
width: `${rect.width}px`,
|
|
91
|
+
height: `${rect.height}px`,
|
|
76
92
|
});
|
|
77
93
|
document.body.style.setProperty('cursor', 'crosshair', 'important');
|
|
78
94
|
}
|
|
@@ -85,8 +101,10 @@ export async function serviceElementPicker(message) {
|
|
|
85
101
|
const rect = {
|
|
86
102
|
height: clientRect.height,
|
|
87
103
|
width: clientRect.width,
|
|
88
|
-
x: clientRect.left +
|
|
89
|
-
|
|
104
|
+
x: clientRect.left +
|
|
105
|
+
window.scrollX,
|
|
106
|
+
y: clientRect.top +
|
|
107
|
+
window.scrollY,
|
|
90
108
|
};
|
|
91
109
|
await browser.runtime.sendMessage({
|
|
92
110
|
...message,
|
|
@@ -114,11 +132,15 @@ export async function serviceGetFullPageRectData(message) {
|
|
|
114
132
|
args: [message],
|
|
115
133
|
func: (message) => {
|
|
116
134
|
const rect = {
|
|
117
|
-
x: 0,
|
|
135
|
+
x: 0,
|
|
136
|
+
y: 0,
|
|
118
137
|
width: document.documentElement.scrollWidth,
|
|
119
138
|
height: document.documentElement.scrollHeight,
|
|
120
139
|
};
|
|
121
|
-
browser.runtime.sendMessage({
|
|
140
|
+
browser.runtime.sendMessage({
|
|
141
|
+
...message,
|
|
142
|
+
rect
|
|
143
|
+
});
|
|
122
144
|
},
|
|
123
145
|
});
|
|
124
146
|
}
|
|
@@ -136,18 +158,22 @@ export async function serviceFindAllMagnetLink(message) {
|
|
|
136
158
|
attrElements.forEach(el => {
|
|
137
159
|
Array.from(el.attributes)
|
|
138
160
|
.forEach(attr => {
|
|
139
|
-
if (attr.value.includes('magnet:?xt='))
|
|
161
|
+
if (attr.value.includes('magnet:?xt=')) {
|
|
140
162
|
magnets.add(attr.value.trim());
|
|
163
|
+
}
|
|
141
164
|
});
|
|
142
165
|
});
|
|
143
166
|
// Type 2: Text content
|
|
144
167
|
document.querySelectorAll('div, span, td, p, a, button')
|
|
145
168
|
.forEach(el => {
|
|
146
|
-
if (el.children.length ===
|
|
147
|
-
|
|
169
|
+
if (el.children.length ===
|
|
170
|
+
0) {
|
|
171
|
+
const text = el.textContent?.trim() ||
|
|
172
|
+
'';
|
|
148
173
|
const match = text.match(/magnet:\?xt=[^\s"'<>]+/);
|
|
149
|
-
if (match)
|
|
174
|
+
if (match) {
|
|
150
175
|
magnets.add(match[0]);
|
|
176
|
+
}
|
|
151
177
|
}
|
|
152
178
|
});
|
|
153
179
|
await browser.runtime.sendMessage({
|
|
@@ -163,12 +189,18 @@ export async function serviceFindAllMagnetLink(message) {
|
|
|
163
189
|
export async function serviceDealWithMagnetLink(message) {
|
|
164
190
|
const { title, data, handleOption } = message;
|
|
165
191
|
const titleCleaned = serviceRemoveIllegalWord(title);
|
|
166
|
-
if (!Array.isArray(data) ||
|
|
167
|
-
|
|
192
|
+
if (!Array.isArray(data) ||
|
|
193
|
+
data.length ===
|
|
194
|
+
0) {
|
|
195
|
+
await browserNotificationCreateBasicMessageOnly('magnet link not found!');
|
|
168
196
|
return;
|
|
169
197
|
}
|
|
170
198
|
const content = `${data.join('\n')}\n`;
|
|
171
|
-
const filename = [
|
|
199
|
+
const filename = [
|
|
200
|
+
'magnet-link',
|
|
201
|
+
titleCleaned,
|
|
202
|
+
serviceGetCurrentDateYYYYMMDDHHMMSS()
|
|
203
|
+
].join(' ');
|
|
172
204
|
switch (handleOption) {
|
|
173
205
|
case 'clipboard':
|
|
174
206
|
await serviceCopyContentToClipboard(content);
|
|
@@ -6,6 +6,8 @@ export interface YoutubePlaylistInfo {
|
|
|
6
6
|
playlistVideolink: string;
|
|
7
7
|
playlistId: string;
|
|
8
8
|
}
|
|
9
|
+
export type ImageQualityYTB = 'maxresdefault' | 'sddefault' | 'hqdefault' | 'mqdefault';
|
|
10
|
+
export declare function serviceGetImageURLYTB(vid: string, imageQuality: ImageQualityYTB): string;
|
|
9
11
|
/**
|
|
10
12
|
* `https://www.youtube.com/watch?v=${vid}`
|
|
11
13
|
* @param vid
|
|
@@ -20,4 +22,4 @@ export declare function servicePureVideolinkYTB(videolinkOrigin: string): Youtub
|
|
|
20
22
|
* Extracts playlist ID and creates a clean YouTube playlist URL.
|
|
21
23
|
*/
|
|
22
24
|
export declare function servicePurePlaylistVideolinkYTB(videolinkOrigin: string): YoutubePlaylistInfo | null;
|
|
23
|
-
//# sourceMappingURL=
|
|
25
|
+
//# sourceMappingURL=serviceOperationYTB.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serviceOperationYTB.d.ts","sourceRoot":"","sources":["../src/serviceOperationYTB.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,mBAAmB;IAClC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,eAAe,GACvB,eAAe,GACf,WAAW,GACX,WAAW,GACX,WAAW,CAAA;AAEf,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,MAAM,EACX,YAAY,EAAE,eAAe,GAC5B,MAAM,CAER;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,eAAe,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAmCxF;AAED;;GAEG;AACH,wBAAgB,+BAA+B,CAAC,eAAe,EAAE,MAAM,GAAG,mBAAmB,GAAG,IAAI,CAoBnG"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"serviceOperationYTBURL.d.ts","sourceRoot":"","sources":["../src/serviceOperationYTBURL.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,mBAAmB;IAClC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,eAAe,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAmCxF;AAED;;GAEG;AACH,wBAAgB,+BAA+B,CAAC,eAAe,EAAE,MAAM,GAAG,mBAAmB,GAAG,IAAI,CAoBnG"}
|