mirror of
https://github.com/ZiuChen/ClipboardManager.git
synced 2025-12-22 18:22:46 +08:00
fix: 区分Mac平台 采用旧的剪贴板监听方式
This commit is contained in:
2
public/time.worker.js
Normal file
2
public/time.worker.js
Normal file
@@ -0,0 +1,2 @@
|
||||
// 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