@vacantthinker/firefox-addon-framework-easy 2026.608.855 → 2026.608.1026

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vacantthinker/firefox-addon-framework-easy",
3
- "version": "2026.0608.0855",
3
+ "version": "2026.0608.1026",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "publishConfig": {
package/src/browserTab.js CHANGED
@@ -62,14 +62,15 @@ export async function browserTabCreateToDownload(message) {
62
62
  * @returns {Promise<void>}
63
63
  */
64
64
  export async function browserTabCreateNearSendMessageToContentJs(message) {
65
- let {title, url} = message;
66
- await browserNotificationCreate(`new tab! ${title || url}`);
67
-
68
- let {focusNewTab} = message;
69
65
  let properties = {
70
- url, tabId: message.tabId,
71
- active: focusNewTab || false,
66
+ url: message.url,
72
67
  };
68
+ if (message.tabId) {
69
+ Object.assign(properties,{tabId:message.tabId})
70
+ }
71
+ if (message.focusNewTab) {
72
+ Object.assign(properties, {active:message.focusNewTab})
73
+ }
73
74
 
74
75
  let {tabId} = await tabOpCreateNear(properties);
75
76
  browser.tabs.onUpdated.addListener(
package/src/opTab.js CHANGED
@@ -26,11 +26,14 @@ export async function tabOpCreate(properties) {
26
26
  * @returns {Promise<(browser.tabs.Tab & {tabId: number})>}
27
27
  */
28
28
  export async function tabOpCreateNear(properties) {
29
- let tabPrev = await tabOpGet(properties.tabId);
30
- delete properties.tabId;
31
- Object.assign(properties, {
32
- index: tabPrev.index + 1, openerTabId: tabPrev.id,
33
- });
29
+ if (properties.tabId) {
30
+ let tabPrev = await tabOpGet(properties.tabId);
31
+ delete properties.tabId;
32
+ Object.assign(properties, {
33
+ index: tabPrev.index + 1,
34
+ openerTabId: tabPrev.id,
35
+ });
36
+ }
34
37
 
35
38
  let tab = await tabOpCreate(properties);
36
39
  return tabOpEnhance(tab);
@@ -35,7 +35,7 @@ export function servicePurePlaylistVideolinkYTB(videolinkOrigin) {
35
35
  const u = new URL(videolinkOrigin);
36
36
  let playlistId = u.searchParams.get('list');
37
37
 
38
- let prefix = "https://www.youtube.com/playlist?list=";
38
+ let prefix = 'https://www.youtube.com/playlist?list=';
39
39
  let playlistVideolink = `${prefix}${playlistId}`;
40
40
  const ret = {playlistVideolink, playlistId};
41
41
  return ret;