Update tampermonkey script
This commit is contained in:
@@ -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",
|
||||
|
Reference in New Issue
Block a user