From 3a187f858f230b755c79b64062f7f1f980246bdc Mon Sep 17 00:00:00 2001 From: n0rdye Date: Sun, 5 Nov 2023 17:57:18 +0000 Subject: [PATCH] modified: public/lib/fn.js --- public/lib/fn.js | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/public/lib/fn.js b/public/lib/fn.js index ba33e28..b96c2f2 100644 --- a/public/lib/fn.js +++ b/public/lib/fn.js @@ -361,26 +361,26 @@ async function removeImageBackground(image) { } } - $.post( "/get_objs") - .done(function( res ) { - if(res["out"] == "good"){ - // console.log(res["body"]); - let sources = []; - res["body"].forEach(element => { - sources.push(element["img"]); - if(element == res["body"].at(-1)){ - // console.log(sources); - preloadImages(sources,()=>{ - // console.log("cached"); - callback(); - // sources.forEach(element => { - // console.log(element,is_cached(element)); - // }); - }) - } - }); - } - }); + // $.post( "/get_objs") + // .done(function( res ) { + // if(res["out"] == "good"){ + // // console.log(res["body"]); + // let sources = []; + // res["body"].forEach(element => { + // sources.push(element["img"]); + // if(element == res["body"].at(-1)){ + // // console.log(sources); + // preloadImages(sources,()=>{ + // // console.log("cached"); + // callback(); + // // sources.forEach(element => { + // // console.log(element,is_cached(element)); + // // }); + // }) + // } + // }); + // } + // }); function is_cached(img_url){ var imgEle = document.createElement("img");