eslint the merged code
This commit is contained in:
parent
c08f229318
commit
bb80eea9d4
@ -116,16 +116,16 @@ var titles = {
|
||||
"Negative Guidance minimum sigma": "Skip negative prompt for steps where image is already mostly denoised; the higher this value, the more skips there will be; provides increased performance in exchange for minor quality reduction."
|
||||
};
|
||||
|
||||
function updateTooltipForSpan(span){
|
||||
function updateTooltipForSpan(span) {
|
||||
if (span.title) return; // already has a title
|
||||
|
||||
let tooltip = localization[titles[span.textContent]] || titles[span.textContent];
|
||||
|
||||
if(!tooltip){
|
||||
if (!tooltip) {
|
||||
tooltip = localization[titles[span.value]] || titles[span.value];
|
||||
}
|
||||
|
||||
if(!tooltip){
|
||||
if (!tooltip) {
|
||||
for (const c of span.classList) {
|
||||
if (c in titles) {
|
||||
tooltip = localization[titles[c]] || titles[c];
|
||||
@ -134,35 +134,35 @@ function updateTooltipForSpan(span){
|
||||
}
|
||||
}
|
||||
|
||||
if(tooltip){
|
||||
if (tooltip) {
|
||||
span.title = tooltip;
|
||||
}
|
||||
}
|
||||
|
||||
function updateTooltipForSelect(select){
|
||||
function updateTooltipForSelect(select) {
|
||||
if (select.onchange != null) return;
|
||||
|
||||
select.onchange = function(){
|
||||
select.onchange = function() {
|
||||
select.title = localization[titles[select.value]] || titles[select.value] || "";
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
observedTooltipElements = {"SPAN": 1, "BUTTON": 1, "SELECT": 1, "P": 1}
|
||||
var observedTooltipElements = {SPAN: 1, BUTTON: 1, SELECT: 1, P: 1};
|
||||
|
||||
onUiUpdate(function(m){
|
||||
m.forEach(function(record){
|
||||
record.addedNodes.forEach(function(node){
|
||||
if(observedTooltipElements[node.tagName]){
|
||||
updateTooltipForSpan(node)
|
||||
onUiUpdate(function(m) {
|
||||
m.forEach(function(record) {
|
||||
record.addedNodes.forEach(function(node) {
|
||||
if (observedTooltipElements[node.tagName]) {
|
||||
updateTooltipForSpan(node);
|
||||
}
|
||||
if(node.tagName == "SELECT"){
|
||||
updateTooltipForSelect(node)
|
||||
if (node.tagName == "SELECT") {
|
||||
updateTooltipForSelect(node);
|
||||
}
|
||||
|
||||
if(node.querySelectorAll){
|
||||
node.querySelectorAll('span, button, select, p').forEach(updateTooltipForSpan)
|
||||
node.querySelectorAll('select').forEach(updateTooltipForSelect)
|
||||
if (node.querySelectorAll) {
|
||||
node.querySelectorAll('span, button, select, p').forEach(updateTooltipForSpan);
|
||||
node.querySelectorAll('select').forEach(updateTooltipForSelect);
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -442,7 +442,7 @@ function updateImg2imgResizeToTextAfterChangingImage() {
|
||||
gradioApp().getElementById('img2img_update_resize_to').click();
|
||||
}, 500);
|
||||
|
||||
return []
|
||||
return [];
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user