From 85a0dcd8f5e117f0f87860f3ab48adca5a8ad536 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Majdand=C5=BEi=C4=87?= Date: Tue, 18 Jun 2024 18:45:18 +0200 Subject: [PATCH] Update tampermonkey script --- tampermonkey.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tampermonkey.js b/tampermonkey.js index d17234e..d58e91c 100644 --- a/tampermonkey.js +++ b/tampermonkey.js @@ -7,7 +7,7 @@ // @noframes // ==/UserScript== -const API = "https://pocketbase-scratch.site.quack-lab.dev/api/collections/youtubedownload/records"; +const URL = `https://youtube-download-ws-server.site.quack-lab.dev/download`; function waitForElement(element, selector) { return new Promise((resolve) => { @@ -30,13 +30,10 @@ function waitForElement(element, selector) { } function parseVideo(videoElement) { - console.log(videoElement); hookVideo(videoElement); } function hookVideo(videoElement) { - console.log("Hooking", videoElement); - videoElement.addEventListener( "mousedown", function (e) { @@ -47,7 +44,7 @@ function hookVideo(videoElement) { const link = videoElement.querySelector("a#video-title-link").href; console.log(link); - fetch(API, { + fetch(URL, { method: "POST", headers: { "Content-Type": "application/json",