diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-05-18 06:59:10 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-05-18 06:59:10 +0000 |
commit | 57b75f4a037658c1122aa092d1775ac52036b2cf (patch) | |
tree | 078c8fdc85a6754d3799e62ab6a2ed77614b67f3 /javascript/ui.js | |
parent | f88169a9e74066892221b6c8c74c85afb7c1fe57 (diff) | |
download | stable-diffusion-webui-gfx803-57b75f4a037658c1122aa092d1775ac52036b2cf.tar.gz stable-diffusion-webui-gfx803-57b75f4a037658c1122aa092d1775ac52036b2cf.tar.bz2 stable-diffusion-webui-gfx803-57b75f4a037658c1122aa092d1775ac52036b2cf.zip |
eslint related file edits
Diffstat (limited to 'javascript/ui.js')
-rw-r--r-- | javascript/ui.js | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/javascript/ui.js b/javascript/ui.js index f4727ca3..133d6ff3 100644 --- a/javascript/ui.js +++ b/javascript/ui.js @@ -99,13 +99,6 @@ function switch_to_inpaint_sketch() { return args_to_array(arguments); } -function switch_to_inpaint() { - gradioApp().querySelector('#tabs').querySelectorAll('button')[1].click(); - gradioApp().getElementById('mode_img2img').querySelectorAll('button')[2].click(); - - return args_to_array(arguments); -} - function switch_to_extras() { gradioApp().querySelector('#tabs').querySelectorAll('button')[2].click(); @@ -172,7 +165,6 @@ function showRestoreProgressButton(tabname, show) { } function submit() { - rememberGallerySelection('txt2img_gallery'); showSubmitButtons('txt2img', false); var id = randomId(); @@ -192,7 +184,6 @@ function submit() { } function submit_img2img() { - rememberGallerySelection('img2img_gallery'); showSubmitButtons('img2img', false); var id = randomId(); @@ -273,7 +264,7 @@ function confirm_clear_prompt(prompt, negative_prompt) { } -promptTokecountUpdateFuncs = {}; +var promptTokecountUpdateFuncs = {}; function recalculatePromptTokens(name) { if (promptTokecountUpdateFuncs[name]) { @@ -304,7 +295,8 @@ onUiUpdate(function() { var textarea = json_elem.querySelector('textarea'); var jsdata = textarea.value; opts = JSON.parse(jsdata); - executeCallbacks(optionsChangedCallbacks); + + executeCallbacks(optionsChangedCallbacks); /*global optionsChangedCallbacks*/ Object.defineProperty(textarea, 'value', { set: function(newValue) { @@ -390,7 +382,9 @@ function update_txt2img_tokens(...args) { } function update_img2img_tokens(...args) { - update_token_counter("img2img_token_button"); + update_token_counter( + "img2img_token_button" + ); if (args.length == 2) { return args[0]; } @@ -423,7 +417,7 @@ function restart_reload() { // Simulate an `input` DOM event for Gradio Textbox component. Needed after you edit its contents in javascript, otherwise your edits // will only visible on web page and not sent to python. function updateInput(target) { - let e = new Event("input", { bubbles: true }); + let e = new Event("input", {bubbles: true}); Object.defineProperty(e, "target", {value: target}); target.dispatchEvent(e); } @@ -435,7 +429,7 @@ function selectCheckpoint(name) { gradioApp().getElementById('change_checkpoint').click(); } -function currentImg2imgSourceResolution(_, _, scaleBy) { +function currentImg2imgSourceResolution(w, h, scaleBy) { var img = gradioApp().querySelector('#mode_img2img > div[style="display: block;"] img'); return img ? [img.naturalWidth, img.naturalHeight, scaleBy] : [0, 0, scaleBy]; } |