@vacantthinker/firefox-addon-framework-easy 2026.604.1807 → 2026.605.333
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,14 +1,16 @@
|
|
|
1
1
|
import {tabOpRemove} from './opTab.js';
|
|
2
2
|
import {serviceDownloadByDownlink} from './serviceCommon.js';
|
|
3
3
|
import {browserTabSendMessage} from './browserTab.js';
|
|
4
|
+
import {browserNotificationCreate} from './browserNotification.js';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* offer common act <=> function, eg: actRemoveTab, actLog
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
*
|
|
9
|
+
*
|
|
9
10
|
*
|
|
10
11
|
* @param act{
|
|
11
12
|
* 'actLog'
|
|
13
|
+
* |'actNotification'
|
|
12
14
|
* |'actRemoveTab'
|
|
13
15
|
* |'actDownloadFile'
|
|
14
16
|
* |'actSendMessageToTab'
|
|
@@ -20,6 +22,9 @@ export function browserRuntimeOnMessageCommon(act, message) {
|
|
|
20
22
|
case 'actLog':
|
|
21
23
|
console.log('act', act, 'message', message);
|
|
22
24
|
break;
|
|
25
|
+
case 'actNotification':
|
|
26
|
+
browserNotificationCreate(message.content)
|
|
27
|
+
break
|
|
23
28
|
case 'actRemoveTab':
|
|
24
29
|
tabOpRemove(message.tabId);
|
|
25
30
|
break;
|
package/src/generate.js
CHANGED
|
@@ -161,6 +161,28 @@ export function generateHtmlByUserSettings(
|
|
|
161
161
|
eleWrap.append(eleInput);
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
+
// --- CONDITION 4: SPAN / READ-ONLY TEXT ---
|
|
165
|
+
else if (type === 'span' ) {
|
|
166
|
+
const eleSpan = document.createElement('span');
|
|
167
|
+
// Optional: Add a class for styling read-only text differently
|
|
168
|
+
// eleSpan.className = 'read-only-text';
|
|
169
|
+
|
|
170
|
+
stoOpGet(storageKey).then((v) => {
|
|
171
|
+
// Fallback to default schema configuration if no value is stored yet
|
|
172
|
+
const currentVal = (v !== undefined && v !== null) ?
|
|
173
|
+
v :
|
|
174
|
+
storageValue.selected;
|
|
175
|
+
|
|
176
|
+
// Render as plain text
|
|
177
|
+
eleSpan.textContent = String(currentVal);
|
|
178
|
+
|
|
179
|
+
// Initial visibility evaluation
|
|
180
|
+
triggerVisibility(storageKey, currentVal);
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
eleWrap.append(eleSpan);
|
|
184
|
+
}
|
|
185
|
+
|
|
164
186
|
return eleWrap;
|
|
165
187
|
});
|
|
166
188
|
|