[PR #171] [MERGED] Change download buttons to anchor elements for right-click URL copying #170

Closed
opened 2026-02-27 14:57:24 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbootxyz/netboot.xyz-docs/pull/171
Author: @Copilot
Created: 1/24/2026
Status: Merged
Merged: 1/24/2026
Merged by: @antonym

Base: masterHead: copilot/update-downloads-page-links


📝 Commits (2)

  • 229f089 Initial plan
  • 4567c79 Change download buttons from button to anchor elements for right-click URL copying

📊 Changes

1 file changed (+5 additions, -7 deletions)

View changed files

📝 src/components/DownloadCard.js (+5 -7)

📄 Description

Download buttons used <button> with window.open() onClick handlers, preventing users from right-clicking to copy URLs for use with curl/wget.

Changes

  • Replace <button> elements with <a href> anchors in DownloadCard.js
  • Add target="_blank" and rel="noopener noreferrer" to preserve original behavior

Before/After

// Before
<button onClick={() => window.open(url, '_blank')}>Download</button>

// After  
<a href={url} target="_blank" rel="noopener noreferrer">Download</a>

Screenshot

Downloads page

Original prompt

This section details on the original issue you should resolve

<issue_title>The “Downloads” page does not feature links to files</issue_title>
<issue_description>Describe the bug

I wanted to get the URL of the files on https://netboot.xyz/downloads so that I could use curl or wget as the root user.

Instead, I had to download each file with the browser, then move it from CLI. Or copy the URL from the download manager of the browser.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://netboot.xyz/downloads
  2. Do a right click on any “Download” button to copy the URL
  3. There are not links so it doesn’t work

Expected behavior
These buttons or their containers should be link so that we would be able to copy their URL.

Screenshots
.

Additional context
Alternative solutions:

  • add plain links that can be copy-pasted
  • add buttons to copy the URL in the clipboard

</issue_description>

<agent_instructions>Update downloads page to allow for right click downloads</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbootxyz/netboot.xyz-docs/pull/171 **Author:** [@Copilot](https://github.com/apps/copilot-swe-agent) **Created:** 1/24/2026 **Status:** ✅ Merged **Merged:** 1/24/2026 **Merged by:** [@antonym](https://github.com/antonym) **Base:** `master` ← **Head:** `copilot/update-downloads-page-links` --- ### 📝 Commits (2) - [`229f089`](https://github.com/netbootxyz/netboot.xyz-docs/commit/229f08937e350a1e9b7c3e976f5d8661f37f2f4f) Initial plan - [`4567c79`](https://github.com/netbootxyz/netboot.xyz-docs/commit/4567c799c9dcd623f9f3e90e7d382a131d98794e) Change download buttons from button to anchor elements for right-click URL copying ### 📊 Changes **1 file changed** (+5 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `src/components/DownloadCard.js` (+5 -7) </details> ### 📄 Description Download buttons used `<button>` with `window.open()` onClick handlers, preventing users from right-clicking to copy URLs for use with `curl`/`wget`. ### Changes - Replace `<button>` elements with `<a href>` anchors in `DownloadCard.js` - Add `target="_blank"` and `rel="noopener noreferrer"` to preserve original behavior ### Before/After ```jsx // Before <button onClick={() => window.open(url, '_blank')}>Download</button> // After <a href={url} target="_blank" rel="noopener noreferrer">Download</a> ``` ### Screenshot ![Downloads page](https://github.com/user-attachments/assets/a0e8e44f-52a2-4e8a-a1dc-a918768b6514) <!-- START COPILOT ORIGINAL PROMPT --> <details> <summary>Original prompt</summary> > > ---- > > *This section details on the original issue you should resolve* > > <issue_title>The “Downloads” page does not feature links to files</issue_title> > <issue_description>**Describe the bug** > > I wanted to get the URL of the files on https://netboot.xyz/downloads so that I could use `curl` or `wget` as the root user. > > Instead, I had to download each file with the browser, then move it from CLI. Or copy the URL from the download manager of the browser. > > **To Reproduce** > Steps to reproduce the behavior: > 1. Go to https://netboot.xyz/downloads > 2. Do a right click on any “Download” button to copy the URL > 3. There are not links so it doesn’t work > > **Expected behavior** > These buttons or their containers should be link so that we would be able to copy their URL. > > **Screenshots** > . > > **Additional context** > Alternative solutions: > > - add plain links that can be copy-pasted > - add buttons to copy the URL in the clipboard > > </issue_description> > > <agent_instructions>Update downloads page to allow for right click downloads</agent_instructions> > > ## Comments on the Issue (you are @copilot in this section) > > <comments> > </comments> > </details> <!-- START COPILOT CODING AGENT SUFFIX --> - Fixes netbootxyz/netboot.xyz-docs#170 <!-- START COPILOT CODING AGENT TIPS --> --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 14:57:24 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/netboot.xyz-docs#170
No description provided.