[Feature] YouTube 影片頁面直接顯示下載按鈕(像 IDM:播放器旁一鍵下載 + 畫質選單)

Open
#118 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
frontend

Research direction

Start by locating the extension's content-script and background-message entry points, then read how they currently handle download requests. The issue proposes YouTube watch/shorts buttons, quality selection, SPA navigation handling, and an optional setting, while delegating parsing to gopeed-extension-youtube. Done means those flows can create Gopeed tasks without requiring users to copy and paste a video URL.

Written by the indexing model from the issue text.

Description

需求:YouTube 影片頁面直接顯示「下載」按鈕(像 IDM 那樣)

現況
  • Gopeed 已有 YouTube 解析擴充(monkeyWie/gopeed-extension-youtube),但使用流程是「複製影片連結 → 切到 Gopeed 視窗 → 貼上建立任務」。對一般使用者不直觀,很多人裝完之後不知道要貼網址,會以為功能沒生效。
  • 瀏覽器擴充目前只負責接管一般檔案下載,在 YouTube 頁面上完全沒有任何提示或按鈕,所以使用者在影片頁停留時看不到任何可下載的跡象。
建議做法
  1. content script 偵測 youtube.com/watch 與 youtube.com/shorts/*,在播放器右上角(或標題列下方)注入一個「下載」按鈕。
  2. 點擊後彈出畫質選單(最高 / 1080p / 720p / 僅音訊),選擇後透過既有 message 通道交給背景腳本,再呼叫 Gopeed 建立任務;解析仍由 gopeed-extension-youtube 負責,不需重寫解析邏輯。
  3. 播放清單頁面可支援批量勾選下載。
  4. 按鈕顯示與否做成擴充設定開關,避免干擾不想用的人。
與 #112 的關係

#112 是「右鍵選單 → Download with Gopeed」,本需求是「頁面內常駐按鈕」,兩者更直觀程度不同,但可以共用同一套 background → Gopeed 的呼叫邏輯,實作上不衝突。

實作提示
  • content script 注入按鈕 → chrome.runtime.sendMessage → background 呼叫 Gopeed REST API 建立任務(對應 repo README 提到的 API / CLI 整合能力)。
  • 若桌面版建立任務需要 token 或本機埠,可由桌面端自動帶入,或讓使用者在擴充選項頁貼一次。
  • 需注意 SPA 路由:YouTube 換片不重載頁面,要監聽 yt-navigate-finish 事件重新掛載按鈕。

English summary

Feature request: inject a "Download" button on YouTube watch/shorts pages from the browser extension, with a quality picker, delegating parsing to the existing gopeed-extension-youtube and creating the task through Gopeed's API. Today users must copy the URL and paste it into Gopeed manually, which makes the YouTube support effectively invisible on the video page. Differs from #112 (context-menu action) in that the button is always visible in-page; both can share the same background call path. SPA navigation (yt-navigate-finish) must be handled so the button survives in-app navigation.

Dominant language
TypeScript
Stars
382
Forks
27
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from GopeedLab/browser-extension

All issues in GopeedLab/browser-extension

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.