@vacantthinker/firefox-addon-framework-easy 2026.5.2-2.1 → 2026.5.2-2.2
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
package/src/baseService.js
CHANGED
|
@@ -30,6 +30,13 @@ export function serviceCopyContentToClipboard(content) {
|
|
|
30
30
|
window.navigator.clipboard.writeText(content).then(r => null);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
export function serviceGetRuntimeManifestVersion() {
|
|
34
|
+
return browser.runtime.getManifest().version;
|
|
35
|
+
}
|
|
36
|
+
export async function serviceGetRuntimePlatformInfo() {
|
|
37
|
+
return await browser.runtime.getPlatformInfo();
|
|
38
|
+
}
|
|
39
|
+
|
|
33
40
|
/**
|
|
34
41
|
*
|
|
35
42
|
* @type {{txt: string, json: string, cmd: string, js: string}}
|
|
@@ -69,13 +76,17 @@ export function serviceSaveContentToLocal(content, filename, ext = "txt") {
|
|
|
69
76
|
}
|
|
70
77
|
|
|
71
78
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @param {string} value
|
|
82
|
+
* @returns {string}
|
|
83
|
+
*/
|
|
84
|
+
export function serviceRemoveIllegalWord(value) {
|
|
85
|
+
let searchValue = /[\/\\\[\]\-"『』<>›::;❗”“'|丨|⦇⦈??!!「」【】─\(\)()《》*#$@&%、,,。+·•]/g;
|
|
86
|
+
let name0 = value.trim().split(/\r?\n/).shift();
|
|
87
|
+
let name1 = name0.replace(searchValue, ' ');
|
|
88
|
+
let name2 = name1.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, ' ');
|
|
89
|
+
return name2;
|
|
79
90
|
}
|
|
80
91
|
|
|
81
92
|
/**
|
|
Binary file
|