mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-12-29 02:45:05 +08:00
eslint
This commit is contained in:
parent
9158d0fd12
commit
0d90064e9e
@ -111,29 +111,24 @@ function localizeWholePage(){
|
||||
processNode(gradioApp());
|
||||
|
||||
function elem(comp) {
|
||||
if(comp.props.elem_id) {
|
||||
elem_id = comp.props.elem_id;
|
||||
} else{
|
||||
elem_id = "component-" + comp.id;
|
||||
}
|
||||
|
||||
var elem_id = comp.props.elem_id ? comp.props.elem_id : "component-" + comp.id;
|
||||
return gradioApp().getElementById(elem_id);
|
||||
}
|
||||
|
||||
for(comp of window.gradio_config.components) {
|
||||
for (var comp of window.gradio_config.components) {
|
||||
if (comp.props.webui_tooltip) {
|
||||
var e = elem(comp);
|
||||
let e = elem(comp);
|
||||
|
||||
var tl = e ? getTranslation(e.title) : undefined;
|
||||
let tl = e ? getTranslation(e.title) : undefined;
|
||||
if (tl !== undefined) {
|
||||
e.title = tl;
|
||||
}
|
||||
}
|
||||
if (comp.props.placeholder) {
|
||||
var e = elem(comp);
|
||||
var textbox = e ? e.querySelector('[placeholder]') : null;
|
||||
let e = elem(comp);
|
||||
let textbox = e ? e.querySelector('[placeholder]') : null;
|
||||
|
||||
var tl = textbox ? getTranslation(textbox.placeholder) : undefined;
|
||||
let tl = textbox ? getTranslation(textbox.placeholder) : undefined;
|
||||
if (tl !== undefined) {
|
||||
textbox.placeholder = tl;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user