Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
b82d4a65
Commit
b82d4a65
authored
May 24, 2023
by
Aarni Koskela
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restore support for dropdown tooltips
parent
d66c64b9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
6 deletions
+19
-6
javascript/hints.js
javascript/hints.js
+19
-6
No files found.
javascript/hints.js
View file @
b82d4a65
...
@@ -153,15 +153,28 @@ function processTooltipCheckNodes() {
...
@@ -153,15 +153,28 @@ function processTooltipCheckNodes() {
onUiUpdate
(
function
(
mutationRecords
)
{
onUiUpdate
(
function
(
mutationRecords
)
{
for
(
const
record
of
mutationRecords
)
{
for
(
const
record
of
mutationRecords
)
{
if
(
record
.
type
===
"
childList
"
&&
record
.
target
.
classList
.
contains
(
"
options
"
))
{
// This smells like a Gradio dropdown menu having changed,
// so let's enqueue an update for the input element that shows the current value.
let
wrap
=
record
.
target
.
parentNode
;
let
input
=
wrap
?.
querySelector
(
"
input
"
);
if
(
input
)
{
input
.
title
=
""
;
// So we'll even have a chance to update it.
tooltipCheckNodes
.
add
(
input
);
}
}
for
(
const
node
of
record
.
addedNodes
)
{
for
(
const
node
of
record
.
addedNodes
)
{
if
(
node
.
nodeType
===
Node
.
ELEMENT_NODE
&&
!
node
.
classList
.
contains
(
"
hide
"
))
{
if
(
node
.
nodeType
===
Node
.
ELEMENT_NODE
&&
!
node
.
classList
.
contains
(
"
hide
"
))
{
if
(
!
node
.
title
)
{
if
(
if
(
node
.
tagName
===
"
SPAN
"
||
node
.
tagName
===
"
SPAN
"
||
node
.
tagName
===
"
BUTTON
"
||
node
.
tagName
===
"
BUTTON
"
||
node
.
tagName
===
"
P
"
node
.
tagName
===
"
P
"
||
node
.
tagName
===
"
INPUT
"
)
{
)
{
tooltipCheckNodes
.
add
(
node
);
tooltipCheckNodes
.
add
(
node
);
}
}
}
node
.
querySelectorAll
(
'
span, button, p
'
).
forEach
(
n
=>
tooltipCheckNodes
.
add
(
n
));
node
.
querySelectorAll
(
'
span, button, p
'
).
forEach
(
n
=>
tooltipCheckNodes
.
add
(
n
));
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment