YouTube Hide "Recommended for you" from related videos

Hides videos marked as "Recommended for you" from the related videos on YouTube video pages.

< Opiniones de YouTube Hide "Recommended for you" from related videos

Pregunta o comentario

§
Publicado: 1/9/2016

Youtube dynamic element issue

Hi, the script works fine when the page is loaded. However, if I select a video from the right panel, the script stops working. Because #watch-related is reset with its event bindings. I recommend you to change your code like this:

Old: $('#watch-related').one('DOMSubtreeModified', hideRecommended);
New: $(document).one('DOMNodeInserted', '#watch-related', hideRecommended);

EckankarAutor
§
Publicado: 4/10/2016

Thank you for your suggestion. I have updated the script as you proposed: https://github.com/Eckankar/userscripts/commit/c5019c3656609f818f2025c1291eb7ec47b7668c

Publicar respuesta

Inicia sesión para responder.