@vacantthinker/firefox-addon-framework-easy 2026.528.1449 → 2026.528.1550

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
@@ -91,8 +91,12 @@ export async function stoOpSetNull(k) { }
91
91
 
92
92
  ### 📄 File: `src/opTab.js`
93
93
  ```javascript
94
+ export async function tabOpEnhance(tab) { }
95
+
94
96
  export async function tabOpCreate(properties) { }
95
97
 
98
+ export async function tabOpCreateNear(properties) { }
99
+
96
100
  export async function tabOpCreateActiveFalse(properties) { }
97
101
 
98
102
  export async function tabOpCreateByWindow(url) { }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vacantthinker/firefox-addon-framework-easy",
3
- "version": "2026.0528.1449",
3
+ "version": "2026.0528.1550",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "publishConfig": {
package/src/opTab.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * @param tab{browser.tabs.Tab}
5
5
  * @returns {Promise<(browser.tabs.Tab & {tabId: number})>}
6
6
  */
7
- async function tabOpEnhance(tab) {
7
+ export async function tabOpEnhance(tab) {
8
8
  return Object.assign({}, tab, {tabId: tab.id});
9
9
  }
10
10
 
@@ -20,6 +20,21 @@ export async function tabOpCreate(properties) {
20
20
  return tabOpEnhance(tab);
21
21
  }
22
22
 
23
+ /**
24
+ *
25
+ * @param {browser.tabs._CreateCreateProperties & {tabId: number} } properties
26
+ * @returns {Promise<(browser.tabs.Tab & {tabId: number})>}
27
+ */
28
+ export async function tabOpCreateNear(properties) {
29
+ let tabPrev = await tabOpGet(properties.tabId);
30
+ Object.assign(properties, {
31
+ index: tabPrev.index + 1, openerTabId: tabPrev.id,
32
+ })
33
+
34
+ let tab = await tabOpCreate(properties);
35
+ return tabOpEnhance(tab);
36
+ }
37
+
23
38
 
24
39
  /**
25
40
  * {active: false, muted: true}