diff --git a/readme.md b/readme.md index b2952fd..214ffa4 100644 --- a/readme.md +++ b/readme.md @@ -51,6 +51,7 @@ Click the url in the output info generated by flask (`http://127.0.0.1:5000/` fo ## launch from executable file
Click to expand + - Windows: Download [onnx-modifier.exe (27.6MB)](https://drive.google.com/file/d/1y7mYlvF0G5iiNDgOFh1ESXlTs8I2ipVQ/view?usp=sharing), double-click it and enjoy. - Edge browser is used for runtime environment by default. diff --git a/static/index.js b/static/index.js index 29ed2e0..98be550 100644 --- a/static/index.js +++ b/static/index.js @@ -359,30 +359,32 @@ host.BrowserHost = class { // informs flaskwebgui to keep server running while gui is running // as illusrated in https://github.com/ClimenteA/flaskwebgui#install // and here: https://stackoverflow.com/questions/39993676/code-inside-domcontentloaded-event-not-working - async function getRequest(url='') { - const response = await fetch(url, { - method: 'GET', - cache: 'no-cache' - }) - return response.json() - } - - if (this.document.readyState !== 'loading') { - console.log('document is already ready, just execute code here'); - - let url = this.document.location - let route = "/flaskwebgui-keep-server-alive" - // let interval_request = 3 * 1000 //sec - let interval_request = 0.5 * 1000 //sec - - function keep_alive_server(){ - getRequest(url + route) - .then(data => {}) - // .then(data => console.log(data)) - } - - setInterval(keep_alive_server, interval_request) - } + // ============ to make webgui applications, the following code block shoud be added. ============ // + // async function getRequest(url='') { + // const response = await fetch(url, { + // method: 'GET', + // cache: 'no-cache' + // }) + // return response.json() + // } + + // if (this.document.readyState !== 'loading') { + // console.log('document is already ready, just execute code here'); + + // let url = this.document.location + // let route = "/flaskwebgui-keep-server-alive" + // // let interval_request = 3 * 1000 //sec + // let interval_request = 0.5 * 1000 //sec + + // function keep_alive_server(){ + // getRequest(url + route) + // .then(data => {}) + // // .then(data => console.log(data)) + // } + + // setInterval(keep_alive_server, interval_request) + // } + // ============ to make webgui applications, the above code block shoud be added. ============ // }