From 91bfc71261e160451e89f35a7c0eef66ff98877c Mon Sep 17 00:00:00 2001 From: AUTOMATIC <16777216c@gmail.com> Date: Thu, 22 Sep 2022 12:11:48 +0300 Subject: A big rework, just what you were secretly hoping for! SD upscale moved to scripts Batch processing script removed Batch processing added to main img2img and now works with scripts img2img page UI reworked to use tabs --- javascript/ui.js | 52 +++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 5 deletions(-) (limited to 'javascript/ui.js') diff --git a/javascript/ui.js b/javascript/ui.js index f3860d2e..4944800b 100644 --- a/javascript/ui.js +++ b/javascript/ui.js @@ -35,13 +35,36 @@ function extract_image_from_gallery_extras(gallery){ return extract_image_from_gallery(gallery); } -function submit(){ - // this calls a function from progressbar.js - requestProgress() +function get_tab_index(tabId){ + var res = 0 + + gradioApp().getElementById(tabId).querySelector('div').querySelectorAll('button').forEach(function(button, i){ + if(button.className.indexOf('bg-white') != -1) + res = i + }) + + return res +} + +function create_tab_index_args(tabId, args){ + var res = [] + for(var i=0; i