@vacantthinker/firefox-addon-framework-easy 2026.524.1658 → 2026.524.1751

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
@@ -17,92 +17,142 @@ You can download, clone, or view the complete source code for this application h
17
17
 
18
18
  Below is a list of all public functions found inside the `src` directory:
19
19
 
20
- ### 📄 File: `src/baseORM.js`
20
+ ### File: `src/baseORM.js`
21
21
  ```javascript
22
- export class BaseORM {
22
+ export class BaseORM { }
23
+
23
24
  ```
24
25
 
25
- ### 📄 File: `src/browserNotification.js`
26
+ ### File: `src/browserNotification.js`
26
27
  ```javascript
27
- export async function browserNotificationCreate(content, title = null) {
28
+ export async function browserNotificationCreate(content, title = null) { }
29
+
28
30
  ```
29
31
 
30
- ### 📄 File: `src/browserRuntime.js`
32
+ ### File: `src/browserRuntime.js`
31
33
  ```javascript
32
- export function browserRuntimeReload() {
34
+ export function browserRuntimeReload() { }
35
+
33
36
  export async function browserRuntimeSetUninstallURL(
34
- export function browserRuntimeOnUpdateAvailable(doWhat = async () => {
35
- export function browserRuntimeGeckoId() {
36
- export async function browserRuntimePlatformInfo() {
37
- export function browserRuntimeManifestVersion() {
37
+ url = 'https://addons.mozilla.org/en-US/firefox/user/17783213/',
38
+ ) { }
39
+
40
+ export function browserRuntimeOnUpdateAvailable(doWhat = null) { }
41
+
42
+ export function browserRuntimeGeckoId() { }
43
+
44
+ export async function browserRuntimePlatformInfo() { }
45
+
46
+ export function browserRuntimeManifestVersion() { }
47
+
38
48
  ```
39
49
 
40
- ### 📄 File: `src/generate.js`
50
+ ### File: `src/generate.js`
41
51
  ```javascript
42
52
  export function generateHtmlByUserSettings(
53
+ userSettings,
54
+ radioItemClickFn,
55
+ ) { }
56
+
43
57
  ```
44
58
 
45
- ### 📄 File: `src/opStorage.js`
59
+ ### File: `src/opStorage.js`
46
60
  ```javascript
47
- export async function stoOpCheck(k) {
48
- export async function stoOpGet(k) {
49
- export async function stoOpGetAll() {
50
- export async function stoOpQueryStartWith(k) {
51
- export async function stoOpSet(k, v) {
52
- export async function stoOpRem(k) {
53
- export async function stoOpSetNull(k) {
61
+ export async function stoOpCheck(k) { }
62
+
63
+ export async function stoOpGet(k) { }
64
+
65
+ export async function stoOpGetAll() { }
66
+
67
+ export async function stoOpQueryStartWith(k) { }
68
+
69
+ export async function stoOpSet(k, v) { }
70
+
71
+ export async function stoOpRem(k) { }
72
+
73
+ export async function stoOpSetNull(k) { }
74
+
54
75
  ```
55
76
 
56
- ### 📄 File: `src/opTab.js`
77
+ ### File: `src/opTab.js`
57
78
  ```javascript
58
- export async function tabOpGet(tabId) {
59
- export async function tabOpQueryAll() {
60
- export async function tabOpQueryUrl(urlQuery) {
61
- export async function tabOpQueryUrlThenRemove(urlQuery) {
62
- export async function tabOpReload(tabId) {
63
- export async function tabOpCreate(urlOrArgs) {
64
- export async function tabOpCreateNormal(urlOrArgs) {
65
- export async function tabOpRemove(tabId) {
66
- export async function tabOpHide(tabId) {
67
- export async function tabOpUpdate(tabId, updateProperties) {
68
- export async function tabOpUpdateActiveFalse(tabId) {
69
- export async function tabOpFocus(tabId) {
70
- export async function tabOpInsertCssCode(tabId, code) {
71
- export async function tabOpRemoveCssCode(tabId, code) {
79
+ export async function tabOpGet(tabId) { }
80
+
81
+ export async function tabOpQueryAll() { }
82
+
83
+ export async function tabOpQueryUrl(urlQuery) { }
84
+
85
+ export async function tabOpQueryUrlThenRemove(urlQuery) { }
86
+
87
+ export async function tabOpReload(tabId) { }
88
+
89
+ export async function tabOpCreate(urlOrArgs) { }
90
+
91
+ export async function tabOpCreateNormal(urlOrArgs) { }
92
+
93
+ export async function tabOpRemove(tabId) { }
94
+
95
+ export async function tabOpHide(tabId) { }
96
+
97
+ export async function tabOpUpdate(tabId, updateProperties) { }
98
+
99
+ export async function tabOpUpdateActiveFalse(tabId) { }
100
+
101
+ export async function tabOpFocus(tabId) { }
102
+
103
+ export async function tabOpInsertCssCode(tabId, code) { }
104
+
105
+ export async function tabOpRemoveCssCode(tabId, code) { }
106
+
72
107
  ```
73
108
 
74
- ### 📄 File: `src/serviceFetch.js`
109
+ ### File: `src/serviceFetch.js`
75
110
  ```javascript
76
111
  export async function servicePostJson(
112
+ serverUrl,
113
+ message,
114
+ handleError,
115
+ ) { }
116
+
77
117
  ```
78
118
 
79
- ### 📄 File: `src/serviceGet.js`
119
+ ### File: `src/serviceGet.js`
80
120
  ```javascript
81
- export function serviceGetDomainByUrl(url) {
82
- export function serviceGetCurrentDateYYYYMMDDHHMMSS() {
121
+ export function serviceGetDomainByUrl(url) { }
122
+
123
+ export function serviceGetCurrentDateYYYYMMDDHHMMSS() { }
124
+
83
125
  ```
84
126
 
85
- ### 📄 File: `src/serviceOpContent.js`
127
+ ### File: `src/serviceOpContent.js`
86
128
  ```javascript
87
- export function serviceCopyContentToClipboard(content) {
88
- export function serviceSaveContentToLocal(content, filename, ext = 'txt') {
89
- export function serviceRemoveIllegalWord(value) {
129
+ export function serviceCopyContentToClipboard(content) { }
130
+
131
+ export function serviceSaveContentToLocal(content, filename, ext = 'txt') { }
132
+
133
+ export function serviceRemoveIllegalWord(value) { }
134
+
90
135
  ```
91
136
 
92
- ### 📄 File: `src/servicePureVideolink.js`
137
+ ### File: `src/servicePureVideolink.js`
93
138
  ```javascript
94
- export function servicePureVideolinkYTB(videolinkOrigin) {
139
+ export function servicePureVideolinkYTB(videolinkOrigin) { }
140
+
95
141
  ```
96
142
 
97
- ### 📄 File: `src/serviceUpdateALLStyle.js`
143
+ ### File: `src/serviceUpdateALLStyle.js`
98
144
  ```javascript
99
- export async function serviceUpdataALLTextNodeColor(message) {
100
- export async function serviceUpdataALLNodeBackgroundColor(message) {
145
+ export async function serviceUpdataALLTextNodeColor(message) { }
146
+
147
+ export async function serviceUpdataALLNodeBackgroundColor(message) { }
148
+
101
149
  ```
102
150
 
103
- ### 📄 File: `src/serviceUserSettings.js`
151
+ ### File: `src/serviceUserSettings.js`
104
152
  ```javascript
105
- export async function serviceInitUserSettings(userSettings) {
106
- export async function serviceGetUserSettings(userSettings) {
153
+ export async function serviceInitUserSettings(userSettings) { }
154
+
155
+ export async function serviceGetUserSettings(userSettings) { }
156
+
107
157
  ```
108
158
 
package/package.json CHANGED
@@ -1,15 +1,13 @@
1
1
  {
2
2
  "name": "@vacantthinker/firefox-addon-framework-easy",
3
- "version": "2026.0524.1658",
3
+ "version": "2026.0524.1751",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "publishConfig": {
7
7
  "access": "public",
8
8
  "provenance": true
9
9
  },
10
- "scripts": {
11
- "npm_update": "npm update"
12
- },
10
+ "scripts": {},
13
11
  "author": "VacantThinker",
14
12
  "license": "AGPL-3.0-only",
15
13
  "repository": {
package/publish.sh CHANGED
@@ -44,15 +44,24 @@ Below is a list of all public functions found inside the `src` directory:
44
44
 
45
45
  EOF
46
46
 
47
- # 2. Iterate through all js files, capture lines containing "export " and append them to README
47
+ # 2. Iterate through all js files, capture multi-line signatures, and append them to README
48
48
  for file in src/*.js; do
49
49
  if [ -f "$file" ]; then
50
- echo "### 📄 File: \`$file\`" >> README.md
50
+ echo "### File: \`$file\`" >> README.md
51
51
  echo "\`\`\`javascript" >> README.md
52
52
 
53
- # Capture all function or variable declarations starting with export
54
- # Compatible with: export function name, export const name, export async function name
55
- grep -E "^export (async )?(function|const|let|var|class) " "$file" >> README.md
53
+ # Reads multi-line signatures up to the opening brace or semicolon
54
+ awk '/^export (async )?(function|const|let|var|class) / {
55
+ line = $0
56
+ # Keep reading lines if there is no opening brace or semicolon yet
57
+ while (line !~ /\{/ && line !~ /;/ && (getline next_line) > 0) {
58
+ line = line "\n" next_line
59
+ }
60
+ # Clean up the function body and replace it with standard closing
61
+ sub(/\{.*/, "{ }", line)
62
+ print line
63
+ print ""
64
+ }' "$file" >> README.md
56
65
 
57
66
  echo "\`\`\`" >> README.md
58
67
  echo "" >> README.md
@@ -19,23 +19,25 @@ export async function browserRuntimeSetUninstallURL(
19
19
  *
20
20
  * @param doWhat{function}
21
21
  */
22
- export function browserRuntimeOnUpdateAvailable(doWhat = async () => {
23
- try {
24
- let id = await browserNotificationCreate(
25
- 'There is a new version!',
26
- );
27
- browser.notifications.onClicked.addListener(async (notificationId) => {
28
- if (notificationId === id) {
29
- await tabOpCreate(
30
- 'https://addons.mozilla.org/en-US/firefox/user/17783213/');
31
- }
32
- });
33
- } catch (e) {
34
- console.error(e);
35
- }
36
- }) {
22
+ export function browserRuntimeOnUpdateAvailable(doWhat = null) {
37
23
  browser.runtime.onUpdateAvailable.addListener(async (details) => {
38
- await doWhat(details);
24
+ if (doWhat) {
25
+ await doWhat(details);
26
+ }
27
+ else {
28
+ try {
29
+ let id = await browserNotificationCreate(
30
+ 'There is a new version!',
31
+ );
32
+ browser.notifications.onClicked.addListener(async (notificationId) => {
33
+ if (notificationId === id) {
34
+ await tabOpCreate('https://addons.mozilla.org/en-US/firefox/user/17783213/');
35
+ }
36
+ });
37
+ } catch (e) {
38
+ console.error(e);
39
+ }
40
+ }
39
41
  });
40
42
  }
41
43