mirror of
https://github.com/ZiuChen/ClipboardManager.git
synced 2025-12-22 18:22:46 +08:00
refactor: 改善剪贴板监听性能 修复大图卡顿与CPU高占用的问题
This commit is contained in:
@@ -1,2 +0,0 @@
|
||||
// time.worker.js author: inu1255
|
||||
const apis={sleep(ms){return new Promise(resolve=>setTimeout(resolve,ms))}};onmessage=event=>{const data=event.data;if(!data)return;const{cb,method,args}=data;if(!apis[method]){postMessage({cb:cb,err:"no such method"});return}apis[method].apply(null,args).then(res=>postMessage({cb:cb,data:res}),err=>postMessage({cb:cb,err:err}))};
|
||||
Reference in New Issue
Block a user