fix: Add public API for Chrome extension (no login required) - New endpoints: /public/youtube/formats, /public/youtube/add - Update extension to use public API - Add contextMenus/notifications permissions

This commit is contained in:
2026-01-08 19:47:41 +09:00
parent c7a3d6fd03
commit 1b59ca4279
4 changed files with 103 additions and 6 deletions

View File

@@ -5,13 +5,15 @@
"description": "YouTube 영상을 GDM(gommi_downloader_manager)으로 전송하여 다운로드",
"permissions": [
"activeTab",
"storage"
"storage",
"contextMenus",
"notifications"
],
"host_permissions": [
"https://www.youtube.com/*",
"https://youtu.be/*",
"http://localhost:*/*",
"http://127.0.0.1:*/*"
"http://*/*",
"https://*/*"
],
"action": {
"default_popup": "popup.html",

View File

@@ -93,7 +93,7 @@ async function fetchVideoInfo() {
try {
const response = await fetch(
`${serverUrl}/gommi_downloader_manager/ajax/queue/youtube_formats?url=${encodeURIComponent(currentUrl)}`,
`${serverUrl}/gommi_downloader_manager/public/youtube/formats?url=${encodeURIComponent(currentUrl)}`,
{ method: 'GET' }
);
@@ -166,7 +166,7 @@ async function startDownload() {
try {
const response = await fetch(
`${serverUrl}/gommi_downloader_manager/ajax/queue/youtube_add`,
`${serverUrl}/gommi_downloader_manager/public/youtube/add`,
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },