@vacantthinker/firefox-addon-framework-easy 2026.528.2315 → 2026.528.2339
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 +7 -7
package/package.json
CHANGED
package/src/serviceCommon.js
CHANGED
|
@@ -151,7 +151,7 @@ export async function serviceElementPicker(message) {
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
/**
|
|
154
|
-
* middle ware, output:
|
|
154
|
+
* middle ware, output: {rectdata}
|
|
155
155
|
*
|
|
156
156
|
* @param message{{
|
|
157
157
|
* tabId:number,
|
|
@@ -165,18 +165,18 @@ export async function serviceGetFullPageRectData(message) {
|
|
|
165
165
|
await browser.scripting.executeScript({
|
|
166
166
|
target: {tabId},
|
|
167
167
|
args: [message],
|
|
168
|
-
func:
|
|
168
|
+
func: (message) => {
|
|
169
169
|
|
|
170
170
|
let x = 0, y = 0;
|
|
171
171
|
let width = document.documentElement.scrollWidth;
|
|
172
172
|
let height = document.documentElement.scrollHeight;
|
|
173
|
-
|
|
174
|
-
|
|
173
|
+
let rectData = {
|
|
174
|
+
x, y, width, height,
|
|
175
|
+
};
|
|
176
|
+
browser.runtime.sendMessage(Object.assign(
|
|
175
177
|
{},
|
|
176
178
|
message,
|
|
177
|
-
{
|
|
178
|
-
x, y, width, height,
|
|
179
|
-
},
|
|
179
|
+
{rectData},
|
|
180
180
|
));
|
|
181
181
|
// todo end if (message)
|
|
182
182
|
},
|