@vacantthinker/firefox-addon-framework-easy 2026.604.640 → 2026.604.1615

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 CHANGED
@@ -146,6 +146,8 @@ export async function tabOpRemoveCssCode(tabId, code) { }
146
146
 
147
147
  ### 📄 File: `src/serviceCommon.js`
148
148
  ```javascript
149
+ export async function serviceDownloadByDownlink(message) { }
150
+
149
151
  ```
150
152
 
151
153
  ### 📄 File: `src/serviceFetch.js`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vacantthinker/firefox-addon-framework-easy",
3
- "version": "2026.0604.0640",
3
+ "version": "2026.0604.1615",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "publishConfig": {
package/src/BaseORM.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import {
2
2
  stoOpCheck,
3
3
  stoOpGet,
4
- stoOpQueryStartWith,
5
4
  stoOpRem,
6
5
  stoOpSet,
7
6
  } from './opStorage.js';
@@ -2,13 +2,13 @@
2
2
  *
3
3
  * @param param0
4
4
  * @param param0.downlink{string}
5
- * @param param0.filename{string}
5
+ * @param param0.filename{string|null|undefined}
6
6
  * @returns {Promise<void>}
7
7
  */
8
8
  export async function browserDownloadByDownlink(
9
9
  {
10
10
  downlink,
11
- filename,
11
+ filename= null,
12
12
  }) {
13
13
 
14
14
  let url = downlink;
@@ -0,0 +1,21 @@
1
+ import {browserDownloadByDownlink} from './browserDownload.js';
2
+ import {browserNotificationCreate} from './browserNotification.js';
3
+
4
+ /**
5
+ * service, download by downlink, if success, notification the filename
6
+ *
7
+ * if failed, nootification the reason, then try download only use downlink
8
+ * @param message
9
+ * @returns {Promise<void>}
10
+ */
11
+ export async function serviceDownloadByDownlink(message) {
12
+ let {filename, downlink} = message;
13
+
14
+ browserDownloadByDownlink(message).then(async () => {
15
+ await browserNotificationCreate(`downloading! ${filename}`);
16
+ }, async (reason) => {
17
+ await browserNotificationCreate(`reason=${reason}`)
18
+ await browserDownloadByDownlink({downlink});
19
+ });
20
+
21
+ }