Skip to content

Instantly share code, notes, and snippets.

@Guihgo
Last active November 29, 2018 06:59
Show Gist options
  • Save Guihgo/e2ee3f404e1cd4283474dd901977dcb3 to your computer and use it in GitHub Desktop.
Save Guihgo/e2ee3f404e1cd4283474dd901977dcb3 to your computer and use it in GitHub Desktop.
Youtube sem diálogo chato: "Você está ai ?"
//só colocar no console e você pode ouvir suas playlist sem interrupção chata. Só quero ouvir minhas músicas poh.
function a() {
var targetNode = document.getElementsByTagName('ytd-popup-container')[0];
var config = { attributes: true, childList: true, subtree: true };
var callback = function(mutationsList, observer) {
if(document.getElementById('confirm-button')!=null) {
console.log("apareceu confirm-button");
document.getElementById('confirm-button').click();
}
};
var observer = new MutationObserver(callback);
observer.observe(targetNode, config);
}
a();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment