dsh-gpt-image-playground 0.2.4 → 0.2.5
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 +2 -0
- package/lib/client.js +15 -1
- package/package.json +1 -1
package/THIRD-PARTY-NOTICES.md
CHANGED
|
@@ -25,6 +25,8 @@ Changes made to the redistributed build:
|
|
|
25
25
|
JavaScript is untouched:
|
|
26
26
|
- header controls "安装为应用", "下载客户端", "操作指南"
|
|
27
27
|
- the red "NEW" update badge next to the title (and the update dialog it opens)
|
|
28
|
+
- the product title's link to the upstream repository (the label stays, the
|
|
29
|
+
anchor loses `href`/`target`/`rel`)
|
|
28
30
|
- the settings "关于" tab
|
|
29
31
|
- the settings header's upstream version, replaced with this plugin's version
|
|
30
32
|
|
package/lib/client.js
CHANGED
|
@@ -71,7 +71,11 @@ window.__ModuleLoader__.load({
|
|
|
71
71
|
if (!doc.getElementById(TRIM_STYLE_ID)) {
|
|
72
72
|
const style = doc.createElement('style')
|
|
73
73
|
style.id = TRIM_STYLE_ID
|
|
74
|
-
style.textContent =
|
|
74
|
+
style.textContent = [
|
|
75
|
+
`${FRAME_TRIM.join(',')}{display:none!important}`,
|
|
76
|
+
// A de-linked title still looks like a link on hover without this.
|
|
77
|
+
'header h1 a[data-dsh-gipg-nolink]{pointer-events:none;cursor:default;text-decoration:none}',
|
|
78
|
+
].join('\n')
|
|
75
79
|
doc.head.appendChild(style)
|
|
76
80
|
}
|
|
77
81
|
const label = versionLabel(versions && versions.pluginVersion)
|
|
@@ -79,6 +83,16 @@ window.__ModuleLoader__.load({
|
|
|
79
83
|
for (const button of doc.querySelectorAll('button')) {
|
|
80
84
|
if ((button.textContent || '').trim() === ABOUT_LABEL) button.setAttribute('data-dsh-gipg-about', '1')
|
|
81
85
|
}
|
|
86
|
+
// The product title is a link to the upstream repository on the
|
|
87
|
+
// standalone site. Inside DSH it should read as a plain label, so the
|
|
88
|
+
// anchor keeps its text and styling but loses every navigational bit.
|
|
89
|
+
for (const anchor of doc.querySelectorAll('header h1 a')) {
|
|
90
|
+
if (!/github\.com/.test(anchor.getAttribute('href') ?? '')) continue
|
|
91
|
+
anchor.removeAttribute('href')
|
|
92
|
+
anchor.removeAttribute('target')
|
|
93
|
+
anchor.removeAttribute('rel')
|
|
94
|
+
anchor.setAttribute('data-dsh-gipg-nolink', '1')
|
|
95
|
+
}
|
|
82
96
|
if (!label) return
|
|
83
97
|
for (const span of doc.querySelectorAll('span')) {
|
|
84
98
|
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.5",
|
|
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",
|