Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

227
Views
No se puede obtener DOM del botón de descarga visible después de la actualización del sitio

Se inyectó javascript en youtube conviolencemonkey con la esperanza de hacer que el botón de descarga se vincule a un yt1s con la URL del video actual. No se puede obtener el DOM del botón de descarga después de cambiar el video (el botón en cuestión cambia/el sitio no se reinicia pero mantiene la instancia actual por lo que entiendo).

 // ==UserScript== // @name Usable youtube download button // @namespace Violentmonkey Scripts // @match https://www.youtube.com/watch // @include https://*.youtube.com/* // @grant none // @version 1.0 // @author Nojyto // ==/UserScript== (function() { const API = "https://yt1s.com/en/youtube-to-mp3?q=" console.log("-----------start--------------") function waitForElm(selector){ return new Promise(resolve => { if(document.querySelector(selector)){ return resolve(document.querySelector(selector)) } const observer = new MutationObserver(mutations => { if(document.querySelector(selector)){ resolve(document.querySelector(selector)) observer.disconnect() } }) observer.observe(document.body, { childList: true, subtree: true }) }) } function updateButton(){ waitForElm("#top-level-buttons-computed > ytd-download-button-renderer > ytd-button-renderer > a:nth-child(1)").then((url) => { console.log("-----------change btn--------------") if(url.id === "changed" || !document.body.contains(url)){ url.remove() console.log("removed") updateButton() return } url.href = API + encodeURIComponent(window.location.href) url.target = "_blank" url.id = "changed" url.style.color = "lightblue" console.log(url) console.log(url.href) //console.log(url.href) //console.log("-----------Script end--------------") //document.getElementsByTagName("tp-yt-paper-dialog")[0].remove() //document.getElementsByTagName("ytd-popup-container")[0].remove() }) } window.onload = updateButton; window.addEventListener("yt-navigate-start", updateButton, true) })()
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!