fix: enhance user agent detection to support custom user agent

This commit is contained in:
Harvey Zack committed 2025-05-17 22:16:08 +08:00
1 parent dd57cc2a03
commit 6c4e9f7e78
27 files changed
+324 -283

No files matched your search

@@ -28,7 +28,8 @@ export default class Danmuku {
this.config(option);
// 创建 Web Worker, 用于计算弹幕的 top 值
const blob = new Blob([workerText], { type: 'application/javascript' });
const workerText2 = workerText.replace('export{e as default};', '');
const blob = new Blob([workerText2], { type: 'application/javascript' });
this.worker = new Worker(URL.createObjectURL(blob));
// 绑定公用事件