File size: 1,000 Bytes
5704551
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
function(a){
    if(!window.my_observe_outpaint)
    {
        console.log("setup outpaint here");
        window.my_observe_outpaint = new MutationObserver(function (event) {
            console.log(event);
            let app=document.querySelector("gradio-app").shadowRoot;
            let frame=app.querySelector("#sdinfframe").contentWindow.document;
            frame.querySelector("#outpaint").click();
        });
        window.my_observe_outpaint_target=document.querySelector("gradio-app").shadowRoot.querySelector("#output span")
        window.my_observe_outpaint.observe(window.my_observe_outpaint_target, {
            attributes: false, 
            subtree: true,
            childList: true, 
            characterData: true
        });
    }
    let app=document.querySelector("gradio-app").shadowRoot;
    let frame=app.querySelector("#sdinfframe").contentWindow.document;
    let button=frame.querySelector("#transfer");
    button.click();
    return a;
}