mirror of
https://github.com/ducbao414/win32.run.git
synced 2025-12-15 16:52:49 +09:00
prevent flashing when changing desktop wallpaper
This commit is contained in:
@@ -19,9 +19,19 @@
|
|||||||
let file = await get(fs_item.url);
|
let file = await get(fs_item.url);
|
||||||
url = URL.createObjectURL(file);
|
url = URL.createObjectURL(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await load_image_url(url);
|
||||||
cached_url = url;
|
cached_url = url;
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function load_image_url(url){
|
||||||
|
return new Promise(resolve => {
|
||||||
|
let image = new Image();
|
||||||
|
image.src = url;
|
||||||
|
image.onload = () => resolve();
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user