This document proposes adopting the enhanced implementation for Nexus Download Collection, highlighting why the changes are technically beneficial, safer, and more user-friendly compared to the current behavior.
Overview
The current Nexus Download Collection workflow relies on indirect signals (timeouts, redirects, or assumed completion) to manage downloads. The proposed improvements replace this approach with real download lifecycle control, leveraging GM_download to gain full visibility into progress, success, failure, and cancellation states.
These changes significantly improve reliability, user experience, and long-term maintainability.
Key Improvement Suggestions
1. Replace Time-Based Assumptions with Real Download Control
Problem in the current implementation:
Downloads are triggered via redirects or simulated clicks, without knowing whether a download actually started, completed, or failed.
Suggested improvement:
Adopt an async/await-based flow using GM_download, allowing Nexus Download Collection to explicitly wait for:
Successful completion
User cancellation (pause/stop)
Errors (including Tampermonkey restrictions)
Benefit:
Eliminates race conditions, incorrect timing estimates, and false positives where a download is assumed complete but isn’t.
2. Introduce a Dedicated Download Abstraction
Suggestion:
Encapsulate all download logic inside a single Promise-based helper (e.g. downloadWithGM).
These improvements elevate Nexus Download Collection from a best-effort trigger-based downloader to a fully managed download system with:
Deterministic behavior
Accurate progress tracking
Proper cancellation
Robust error handling
From both a technical and UX standpoint, this aligns Nexus Download Collection with modern download manager expectations and significantly improves reliability for end users.
Suggestion to Improve Nexus Download Collection
This document proposes adopting the enhanced implementation for Nexus Download Collection, highlighting why the changes are technically beneficial, safer, and more user-friendly compared to the current behavior.
Overview
The current Nexus Download Collection workflow relies on indirect signals (timeouts, redirects, or assumed completion) to manage downloads. The proposed improvements replace this approach with real download lifecycle control, leveraging
GM_downloadto gain full visibility into progress, success, failure, and cancellation states.These changes significantly improve reliability, user experience, and long-term maintainability.
Key Improvement Suggestions
1. Replace Time-Based Assumptions with Real Download Control
Problem in the current implementation:
Downloads are triggered via redirects or simulated clicks, without knowing whether a download actually started, completed, or failed.
Suggested improvement:
Adopt an
async/await-based flow usingGM_download, allowing Nexus Download Collection to explicitly wait for:Benefit:
Eliminates race conditions, incorrect timing estimates, and false positives where a download is assumed complete but isn’t.
2. Introduce a Dedicated Download Abstraction
Suggestion:
Encapsulate all download logic inside a single Promise-based helper (e.g.
downloadWithGM).This abstraction should:
Benefit:
3. Fix Pause and Stop Semantics
Problem:
Pause/Stop currently prevents only the next download from starting, while the active transfer continues.
Suggested improvement:
Store the active
GM_downloadcontrol object and explicitly call.abort()when the user pauses or stops.Benefit:
4. Preserve Correct File Names and Extensions
Problem:
Using display names instead of real filenames can cause:
.7z,.rar, etc.)Suggested improvement:
Always use the real file identifier (e.g. file URI) when passing the
nameparameter toGM_download.Benefit:
5. Detect and Handle Tampermonkey Whitelist Errors Explicitly
Suggestion:
Add explicit detection for the
not_whitelistederror reason and notify the user when Tampermonkey blocks a file type.Benefit:
6. Upgrade the UI to Reflect Real-Time Download State
Suggested UI changes:
Benefit:
7. Update Script Metadata
Suggestion:
Ensure Nexus Download Collection metadata includes:
@grant GM_download@updateURL@downloadURLBenefit:
Final Recommendation
These improvements elevate Nexus Download Collection from a best-effort trigger-based downloader to a fully managed download system with:
From both a technical and UX standpoint, this aligns Nexus Download Collection with modern download manager expectations and significantly improves reliability for end users.