@vacantthinker/firefox-addon-framework-easy 2026.526.1620 → 2026.526.1702
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/package.json +1 -1
- package/src/serviceCommon.js +2 -2
- package/src/serviceFetch.js +15 -10
package/package.json
CHANGED
package/src/serviceCommon.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import {browserNotificationCreate} from './browserNotification.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* will get => {
|
|
10
|
+
* will get => {rectData, uniqueSelector,}
|
|
11
11
|
* @param message{{
|
|
12
12
|
* tabId:number,
|
|
13
13
|
* act:string
|
|
@@ -117,7 +117,7 @@ export async function serviceElementPicker(message) {
|
|
|
117
117
|
let messageTakeScreenshot = Object.assign(
|
|
118
118
|
{}, // Start with a fresh, empty object
|
|
119
119
|
message, // Put the original message first so it doesn't overwrite your new data
|
|
120
|
-
rectData,
|
|
120
|
+
{rectData},
|
|
121
121
|
{
|
|
122
122
|
// The guaranteed unique CSS path (e.g., "div#wrap > ul > li:nth-of-type(2)")
|
|
123
123
|
uniqueSelector: getUniqueSelector(target),
|
package/src/serviceFetch.js
CHANGED
|
@@ -61,15 +61,20 @@ export async function serviceSendDataToLocalAria2(message) {
|
|
|
61
61
|
params,
|
|
62
62
|
};
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
64
|
+
try {
|
|
65
|
+
const response = await fetch(`http://localhost:${port}/jsonrpc`, {
|
|
66
|
+
method: 'POST',
|
|
67
|
+
headers: {
|
|
68
|
+
Accept: 'application/json',
|
|
69
|
+
'Content-Type': 'application/json;charset=UTF-8',
|
|
70
|
+
},
|
|
71
|
+
body: JSON.stringify(data),
|
|
72
|
+
});
|
|
73
|
+
console.info(`response=\n`, response);
|
|
74
|
+
|
|
75
|
+
return response;
|
|
76
|
+
} catch (e) {
|
|
77
|
+
console.error(e);
|
|
78
|
+
}
|
|
73
79
|
|
|
74
|
-
return response;
|
|
75
80
|
}
|