From 9b19f763502eeab28ce1bb282b08eef17fc90ddc Mon Sep 17 00:00:00 2001 From: Luca Date: Mon, 20 May 2024 22:50:55 +0200 Subject: [PATCH] 2024.05.20.22.29 --- .gitignore | 2 +- README.md | 1 + pack.sh | 2 ++ src/assets/icon.jpg | Bin 0 -> 17507 bytes src/manifest.json | 33 ++++++++++++++++++++++++++ src/scripts/com.youtube.js | 22 +++++++++++++++++ src/scripts/popup.js | 45 +++++++++++++++++++++++++++++++++++ src/scripts/settings.js | 31 ++++++++++++++++++++++++ src/views/popup.html | 47 +++++++++++++++++++++++++++++++++++++ src/views/sidepanel.html | 24 +++++++++++++++++++ 10 files changed, 206 insertions(+), 1 deletion(-) create mode 100644 pack.sh create mode 100644 src/assets/icon.jpg create mode 100644 src/manifest.json create mode 100644 src/scripts/com.youtube.js create mode 100644 src/scripts/popup.js create mode 100644 src/scripts/settings.js create mode 100644 src/views/popup.html create mode 100644 src/views/sidepanel.html diff --git a/.gitignore b/.gitignore index ceaea36..64fc9a4 100644 --- a/.gitignore +++ b/.gitignore @@ -129,4 +129,4 @@ dist .yarn/build-state.yml .yarn/install-state.gz .pnp.* - +.DS_store diff --git a/README.md b/README.md index 2f14d82..d0adf3f 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # ytdlp-bot-chromeaddon +I mean it's almost selfexplained what this is for and what it does. \ No newline at end of file diff --git a/pack.sh b/pack.sh new file mode 100644 index 0000000..ead0063 --- /dev/null +++ b/pack.sh @@ -0,0 +1,2 @@ +#!/bin/sh +# TODO \ No newline at end of file diff --git a/src/assets/icon.jpg b/src/assets/icon.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a668c969560c6f7f452cc428514a3c9ef2ff7f9f GIT binary patch literal 17507 zcmb4KgL7p~lz%ZNns8z}6Wi9rwr$(SOY&mdwrz7_+nQLj^VQb=0sHH!zFoJE`c`+> zIrnt`UH!WYK#>-g5(j{RfdLHu6~NyOfCvBr{6G9xL;M3IG~|DPg@%TLhJ%HNhl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9~-x3a-zIIo?voe&V3{Ye~gy1io$rVF3_{~Y1zG{{xgy1N--l=nej8xgTsw8aGIWS(t`)+FW zY#J6aD&=hTG)iI-D%<9*SM;G(zI9?Ze9bY{OVLfHC+1DsV?1U z5hgaxT9S6n1xPTC5`609losBXc$qa~&GV|krO=4d}0gPirKwZ}Om zo&IL5YawI0r1Fb1_svR6s8u8656y$(a~+A!*zPv|biB>;sQ8`g;1)ZKqNKPdeAQ-R zcP551pIU*FwKAxLLrhM_t9f&^P-NdZsF^qGLReNbnCfb`lWf&(Ao|s1$rv;#g(D{4 zO02a+wsy@yo99AkUo-vcwrtmo)md$_C@MgeCO}%f`laOc+ z8*a7mo99urPU4RAeHveCy8}J?Pqv#TaGnn(#~LXhS#7z7u+ym`f;=C4J)U zLK#3A&3I-WziO1ZMVTrFPn`^A9V_n_ImHNtd6V;~m(N-p$`5*vi?-Av70mhQY6bFl zHA$0tiE-;fAzaN>m-+Ro%$>7PXWyknsf9Ax>rgF@o779~P%qmx386@z%Bp5PGhY`b Lt7oNgOalMe)}WLl literal 0 HcmV?d00001 diff --git a/src/manifest.json b/src/manifest.json new file mode 100644 index 0000000..48bdc82 --- /dev/null +++ b/src/manifest.json @@ -0,0 +1,33 @@ +{ + "manifest_version": 3, + "name": "DC-YTDLP", + "description": "--", + "version": "1.0", + "action": { + "default_popup": "views/popup.html", + "default_icon": "assets/icon.jpg" + }, + "icons":{ + "16":"assets/icon.jpg", + "48":"assets/icon.jpg", + "128":"assets/icon.jpg" + }, + "side_panel":{ + "default_path":"views/sidepanel.html" + }, + "permissions":[ + "storage", + "sidePanel", + "activeTab", + "tabs" + ], + "content_scripts": [ + { + "js": ["scripts/com.youtube.js"], + "matches": [ + "https://www.youtube.com/*", + "https://youtube.com/*" + ] + } + ] + } \ No newline at end of file diff --git a/src/scripts/com.youtube.js b/src/scripts/com.youtube.js new file mode 100644 index 0000000..5436207 --- /dev/null +++ b/src/scripts/com.youtube.js @@ -0,0 +1,22 @@ +setTimeout(function(){ + let menu = document.getElementById("center"); + let dl_send = document.createElement("button"); + dl_send.innerText = "TEst"; + //menu.append(dl_send) + + dl_send.addEventListener("click",sendLink); + + async function sendLink(){ + let url = window.location; + let u = (await chrome.storage.sync.get("settings_url")).settings_url; + alert(url); + fetch(u,{ + method:"POST", + body:{ + url:url, + type:"mp3" + } + }) + } +},2000) + diff --git a/src/scripts/popup.js b/src/scripts/popup.js new file mode 100644 index 0000000..1912241 --- /dev/null +++ b/src/scripts/popup.js @@ -0,0 +1,45 @@ +let btn_sendURL; +let btn_sendURL_mp4; +let alertBox; + +function startUp() { + btn_sendURL = document.getElementById("sendURL"); + btn_sendURL_mp4 = document.getElementById("sendURL_mp4"); + alertBox = document.getElementById("alerts") + + btn_sendURL.addEventListener("click", sendURL); + btn_sendURL_mp4.addEventListener("click", sendURL_mp4) +} + +async function sendURL() { + sendLink("mp3"); +} +async function sendURL_mp4() { + sendLink("mp4"); +} + +async function sendLink(type) { + let tab = await chrome.tabs.query({ windowType: "normal", active: true }); + let url = tab[0].url; + let u = (await chrome.storage.sync.get("settings_url")).settings_url; + //alert(url); + let resp = await fetch(`${u}/getSong`, { + method: "POST", + headers: { + "content-type": "application/puppy+json", + // 'Content-Type': 'application/x-www-form-urlencoded', + }, + body: JSON.stringify({ + url: url, + type: type + }) + }); + let json_resp = await resp.json(); + alertBox.innerHTML = `
${json_resp.text}
`; + btn_sendURL.disabled = true; + btn_sendURL_mp4.disabled = true; + +} + + +startUp(); \ No newline at end of file diff --git a/src/scripts/settings.js b/src/scripts/settings.js new file mode 100644 index 0000000..c71f8df --- /dev/null +++ b/src/scripts/settings.js @@ -0,0 +1,31 @@ +let urlField; +let saveButton; +let testButton; + +async function startUp(){ + urlField = document.getElementById("url"); + saveButton = document.getElementById("save"); + testButton = document.getElementById("testButton") + + saveButton.addEventListener("click",saveSettings) + testButton.addEventListener("click",Test) + + urlField.value = (await chrome.storage.sync.get("settings_url")).settings_url; +} + +function saveSettings(){ + let tmp_val = urlField.value; + + chrome.storage.sync.set({ "settings_url": tmp_val }); + alert(`Save - ${tmp_val}`); +} + +function Test(){ + chrome.tabs.query({active: true, lastFocusedWindow: true}, tabs => { + let url = tabs[0].url; + alert(url); + // use `url` here inside the callback because it's asynchronous! + }); +} + +startUp(); \ No newline at end of file diff --git a/src/views/popup.html b/src/views/popup.html new file mode 100644 index 0000000..ad7b8d4 --- /dev/null +++ b/src/views/popup.html @@ -0,0 +1,47 @@ + + + + + + + Hi + + + + + + +
+ +
+ + + + \ No newline at end of file diff --git a/src/views/sidepanel.html b/src/views/sidepanel.html new file mode 100644 index 0000000..e186619 --- /dev/null +++ b/src/views/sidepanel.html @@ -0,0 +1,24 @@ + + + + + + Document + + + +
+ URL: + +
+ +
+ + + \ No newline at end of file