diff --git a/frontend/index.html b/frontend/index.html
index 5b72722..b17faeb 100644
--- a/frontend/index.html
+++ b/frontend/index.html
@@ -15,11 +15,13 @@
+
+
+
diff --git a/frontend/script.js b/frontend/script.js
index 2aeb5c5..5d791cb 100644
--- a/frontend/script.js
+++ b/frontend/script.js
@@ -3,14 +3,15 @@ addEventListener('DOMContentLoaded', () => {
const urlField = document.getElementById('url')
/** @type{HTMLSelectElement} */
const site = document.getElementById('site-select')
+ /** @type{HTMLInputElement} */
+ const proxyFlag = document.getElementById('proxy-cb')
document.getElementById('guess-site-btn').addEventListener('click', () => {
const url = urlField.value
if (url.includes('/watch?v=') || url.includes('/playlist?list=')) {
- if (site.value == 'yt_proxied') {
- return
- }
site.value = 'youtube'
+ } else if (url.includes('soundcloud.com/')) {
+ site.value = 'soundcloud'
} else if (url.includes('://music.yandex.')) {
site.value = 'yandex'
}
@@ -28,6 +29,7 @@ addEventListener('DOMContentLoaded', () => {
action: 'list',
site: site.value,
url: urlField.value,
+ proxy: proxyFlag.checked,
}))
logField.textContent = '' // clear
})
@@ -37,6 +39,7 @@ addEventListener('DOMContentLoaded', () => {
action: 'download',
site: site.value,
url: urlField.value,
+ proxy: proxyFlag.checked,
items: items,
}))
items = []