feat: add browser extension integration hooks

- Add lmExtensionHandled check to prevent duplicate downloads
- Add lm:refreshVersions event listener for extension-triggered refresh
- Expose downloadManager to window for extension access
This commit is contained in:
Will Miao
2026-02-22 12:00:32 +08:00
parent 807f4e03ee
commit 0b48654ae6
2 changed files with 15 additions and 0 deletions

View File

@@ -744,3 +744,8 @@ export class DownloadManager {
// Create global instance
export const downloadManager = new DownloadManager();
// Expose to window for browser extension integration
if (typeof window !== 'undefined') {
window.downloadManager = downloadManager;
}