@vacantthinker/firefox-addon-framework-easy 2026.608.1203 → 2026.609.706
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
|
@@ -49,6 +49,8 @@ export async function browserRuntimeSetUninstallURL(
|
|
|
49
49
|
|
|
50
50
|
export function browserRuntimeOnUpdateAvailable(doWhat = null) { }
|
|
51
51
|
|
|
52
|
+
export function browserRuntimeGetURL(path) { }
|
|
53
|
+
|
|
52
54
|
export function browserRuntimeGeckoId() { }
|
|
53
55
|
|
|
54
56
|
export async function browserRuntimePlatformInfo() { }
|
package/package.json
CHANGED
package/src/browserRuntime.js
CHANGED
|
@@ -24,6 +24,15 @@ export function browserRuntimeOnUpdateAvailable(doWhat = null) {
|
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @param path{string}
|
|
30
|
+
* @returns {string}
|
|
31
|
+
*/
|
|
32
|
+
export function browserRuntimeGetURL(path) {
|
|
33
|
+
return browser.runtime.getURL(path)
|
|
34
|
+
}
|
|
35
|
+
|
|
27
36
|
/**
|
|
28
37
|
* @returns {browser._manifest.ExtensionID}
|
|
29
38
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {tabOpRemove} from './opTab.js';
|
|
1
|
+
import {tabOpFocus, tabOpRemove} from './opTab.js';
|
|
2
2
|
import {serviceDownloadByDownlink} from './serviceCommon.js';
|
|
3
3
|
import {browserTabSendMessage} from './browserTab.js';
|
|
4
4
|
import {browserNotificationCreate} from './browserNotification.js';
|
|
@@ -12,10 +12,12 @@ import {browserNotificationCreate} from './browserNotification.js';
|
|
|
12
12
|
* |'actRequestTabIdTabUrl'
|
|
13
13
|
* |'actNotification'
|
|
14
14
|
* |'actRemoveTab'
|
|
15
|
+
* |'actFocusTab'
|
|
15
16
|
* |'actDownloadFile'
|
|
16
17
|
* |'actSendMessageToTab'
|
|
17
18
|
* }
|
|
18
19
|
* @param message
|
|
20
|
+
* @param message.tabId{number}
|
|
19
21
|
* @param sendResponse
|
|
20
22
|
*/
|
|
21
23
|
export function browserRuntimeOnMessageCommon(act, message, sendResponse) {
|
|
@@ -35,6 +37,9 @@ export function browserRuntimeOnMessageCommon(act, message, sendResponse) {
|
|
|
35
37
|
case 'actRemoveTab':
|
|
36
38
|
tabOpRemove(message.tabId);
|
|
37
39
|
break;
|
|
40
|
+
case 'actFocusTab':
|
|
41
|
+
tabOpFocus(message.tabId);
|
|
42
|
+
break;
|
|
38
43
|
case 'actDownloadFile':
|
|
39
44
|
serviceDownloadByDownlink(message);
|
|
40
45
|
break;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {stoOpGet, stoOpSet} from './opStorage.js';
|
|
2
2
|
|
|
3
3
|
export async function serviceInitUserSettings(userSettings) {
|
|
4
|
-
const initPromises = Object.entries(userSettings)
|
|
5
|
-
map(async ([key, setting]) => {
|
|
4
|
+
const initPromises = Object.entries(userSettings)
|
|
5
|
+
.map(async ([key, setting]) => {
|
|
6
6
|
const oldValue = await stoOpGet(key);
|
|
7
7
|
|
|
8
8
|
// FIX: Check strictly for null or undefined.
|