@vacantthinker/firefox-addon-framework-easy 2026.612.1204 → 2026.612.1531
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/dist/browserRuntime.d.ts
CHANGED
|
@@ -9,15 +9,19 @@ export declare function browserRuntimeReload(): void;
|
|
|
9
9
|
export declare function browserRuntimeSetUninstallURL(url?: string): Promise<void>;
|
|
10
10
|
/**
|
|
11
11
|
* Adds a listener for available updates.
|
|
12
|
-
* @param callback Callback to execute when an update is available.
|
|
13
12
|
*/
|
|
14
|
-
export declare function browserRuntimeOnUpdateAvailable(
|
|
13
|
+
export declare function browserRuntimeOnUpdateAvailable(): void;
|
|
15
14
|
/**
|
|
16
15
|
* Converts a relative path to a fully qualified URL.
|
|
17
16
|
* @param path The path to the resource.
|
|
18
17
|
* @returns The absolute URL string.
|
|
19
18
|
*/
|
|
20
19
|
export declare function browserRuntimeGetURL(path: string): string;
|
|
20
|
+
/**
|
|
21
|
+
* `pages/${path}`
|
|
22
|
+
* @param path
|
|
23
|
+
*/
|
|
24
|
+
export declare function browserRuntimeGetPagesURL(path: string): string;
|
|
21
25
|
/**
|
|
22
26
|
* Retrieves the Gecko ID from the manifest.
|
|
23
27
|
* @returns The Gecko ID or empty string if not found.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browserRuntime.d.ts","sourceRoot":"","sources":["../src/browserRuntime.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C;AAED;;;GAGG;AACH,wBAAsB,6BAA6B,CAAC,GAAG,GAAE,MAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAEnF;AAED
|
|
1
|
+
{"version":3,"file":"browserRuntime.d.ts","sourceRoot":"","sources":["../src/browserRuntime.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C;AAED;;;GAGG;AACH,wBAAsB,6BAA6B,CAAC,GAAG,GAAE,MAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAEnF;AAED;;GAEG;AACH,wBAAgB,+BAA+B,IAAI,IAAI,CAGtD;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9D;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAG9C;AAED;;;GAGG;AACH,wBAAsB,0BAA0B,IAAI,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,CAExF;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,IAAI,MAAM,CAEtD;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,IAAI,MAAM,CAEnD"}
|
package/dist/browserRuntime.js
CHANGED
|
@@ -13,13 +13,9 @@ export async function browserRuntimeSetUninstallURL(url = '') {
|
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Adds a listener for available updates.
|
|
16
|
-
* @param callback Callback to execute when an update is available.
|
|
17
16
|
*/
|
|
18
|
-
export function browserRuntimeOnUpdateAvailable(
|
|
19
|
-
browser.runtime.onUpdateAvailable.addListener(
|
|
20
|
-
if (callback) {
|
|
21
|
-
await callback(details);
|
|
22
|
-
}
|
|
17
|
+
export function browserRuntimeOnUpdateAvailable() {
|
|
18
|
+
browser.runtime.onUpdateAvailable.addListener(() => {
|
|
23
19
|
});
|
|
24
20
|
}
|
|
25
21
|
/**
|
|
@@ -30,6 +26,13 @@ export function browserRuntimeOnUpdateAvailable(callback) {
|
|
|
30
26
|
export function browserRuntimeGetURL(path) {
|
|
31
27
|
return browser.runtime.getURL(path);
|
|
32
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* `pages/${path}`
|
|
31
|
+
* @param path
|
|
32
|
+
*/
|
|
33
|
+
export function browserRuntimeGetPagesURL(path) {
|
|
34
|
+
return browser.runtime.getURL(`pages/${path}`);
|
|
35
|
+
}
|
|
33
36
|
/**
|
|
34
37
|
* Retrieves the Gecko ID from the manifest.
|
|
35
38
|
* @returns The Gecko ID or empty string if not found.
|