dsh-gpt-image-playground 0.2.6 → 0.2.7
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/THIRD-PARTY-NOTICES.md +4 -0
- package/lib/client.js +38 -0
- package/package.json +1 -1
package/THIRD-PARTY-NOTICES.md
CHANGED
|
@@ -29,6 +29,10 @@ Changes made to the redistributed build:
|
|
|
29
29
|
anchor loses `href`/`target`/`rel`)
|
|
30
30
|
- the settings "关于" tab
|
|
31
31
|
- the settings header's upstream version, replaced with this plugin's version
|
|
32
|
+
4. One element is **added** rather than removed: a red hint next to
|
|
33
|
+
设置 → API 配置 → 当前配置 ("建议使用 ToolifyAi API 高效稳定") that links to
|
|
34
|
+
https://api.toolify-ai.com. It is injected by `lib/client.js` and is not part
|
|
35
|
+
of the upstream build.
|
|
32
36
|
|
|
33
37
|
No other files of the build were edited.
|
|
34
38
|
|
package/lib/client.js
CHANGED
|
@@ -53,6 +53,12 @@ window.__ModuleLoader__.load({
|
|
|
53
53
|
const TRIM_STYLE_ID = 'dsh-gipg-trim'
|
|
54
54
|
const ABOUT_LABEL = '关于'
|
|
55
55
|
|
|
56
|
+
/** Provider hint appended to the "当前配置" row of 设置 → API 配置. */
|
|
57
|
+
const CURRENT_PROFILE_LABEL = '当前配置'
|
|
58
|
+
const TIP_ATTR = 'data-dsh-gipg-tip'
|
|
59
|
+
const TIP_TEXT = '建议使用 ToolifyAi API 高效稳定'
|
|
60
|
+
const TIP_URL = 'https://api.toolify-ai.com'
|
|
61
|
+
|
|
56
62
|
/** What the settings header shows: the plugin's own version, nothing else. */
|
|
57
63
|
function versionLabel(pluginVersion) {
|
|
58
64
|
return pluginVersion ? `v${pluginVersion}` : undefined
|
|
@@ -93,6 +99,38 @@ window.__ModuleLoader__.load({
|
|
|
93
99
|
anchor.removeAttribute('rel')
|
|
94
100
|
anchor.setAttribute('data-dsh-gipg-nolink', '1')
|
|
95
101
|
}
|
|
102
|
+
// A provider recommendation next to the "当前配置" label in
|
|
103
|
+
// 设置 → API 配置. Injected here so the vendored build stays pristine;
|
|
104
|
+
// re-added on every render because React owns that row.
|
|
105
|
+
for (const span of doc.querySelectorAll('span')) {
|
|
106
|
+
if ((span.textContent || '').trim() !== CURRENT_PROFILE_LABEL) continue
|
|
107
|
+
const row = span.parentElement
|
|
108
|
+
if (!row || row.querySelector(`[${TIP_ATTR}]`)) continue
|
|
109
|
+
const tip = doc.createElement('a')
|
|
110
|
+
tip.setAttribute(TIP_ATTR, '1')
|
|
111
|
+
tip.href = TIP_URL
|
|
112
|
+
tip.target = '_blank'
|
|
113
|
+
tip.rel = 'noopener noreferrer'
|
|
114
|
+
tip.textContent = TIP_TEXT
|
|
115
|
+
tip.title = TIP_URL
|
|
116
|
+
tip.style.cssText = [
|
|
117
|
+
'margin-left:4px',
|
|
118
|
+
'font-size:11px',
|
|
119
|
+
'line-height:1.35',
|
|
120
|
+
'color:#ef4444',
|
|
121
|
+
'text-decoration:none',
|
|
122
|
+
'cursor:pointer',
|
|
123
|
+
'flex:none',
|
|
124
|
+
].join(';')
|
|
125
|
+
tip.addEventListener('mouseenter', () => {
|
|
126
|
+
tip.style.textDecoration = 'underline'
|
|
127
|
+
})
|
|
128
|
+
tip.addEventListener('mouseleave', () => {
|
|
129
|
+
tip.style.textDecoration = 'none'
|
|
130
|
+
})
|
|
131
|
+
row.appendChild(tip)
|
|
132
|
+
break
|
|
133
|
+
}
|
|
96
134
|
if (!label) return
|
|
97
135
|
for (const span of doc.querySelectorAll('span')) {
|
|
98
136
|
const text = (span.textContent || '').trim()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-gpt-image-playground",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
4
4
|
"description": "GPT Image Playground as a DeepSeek Harness plugin: the upstream image generation and editing workbench, vendored, served same-origin, with an optional API proxy.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|