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

85
Views
Javascript no modifica la página web de Youtube

Estoy aprendiendo a crear extensiones de Firefox. Acabo de empezar a desarrollar uno para eliminar los comentarios de youtube.

manifiesto json:

 { "name": "Comment-Blocker", "version": "1.1", "manifest_version": 2, "description": "Blocks comments on an youtube video by specified user", "content_script": [ { "matches": ["*://*.youtube.com/watch?v=*"], "js": ["/commentBlocker.js"] } ], "browser_action": { "browser_style": true, "default_icon": { "48": "/icon.png" }, "default_title": "Comment Deleter", "default_popup": "/popup.html" }, "permissions": [ "*://www.youtube.com/watch?v=*", "storage", "activeTab" ] }

comentarioBlocker.js:

 var comments = document.getElementById("contents").getElementsByClassName("style-scope ytd-item-section-renderer"); for(i = 0; i < comments.length; i++) // length does not include reply chains { var name = comments[i].querySelector('#author-text'); if(name.href == 'https://www.youtube.com/channel/UC-CrrqEdTkOP0BD6_KQ64Uw') { comments[i].hidden = true; } }

El problema es que cuando cargo el complemento temporal, el comentario superior no desaparece. Cuando escribo las instrucciones en la consola funciona. ¿Qué estoy haciendo mal?

video de youtube utilizado para la prueba: https://www.youtube.com/watch?v=Jk71bPz5VLo

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!