Skip to content

Instantly share code, notes, and snippets.

@davidglezz
Last active August 29, 2015 13:56
Show Gist options
  • Save davidglezz/8931317 to your computer and use it in GitHub Desktop.
Save davidglezz/8931317 to your computer and use it in GitHub Desktop.
Tuenti Photo Delete Script :: Script que automatiza el proceso de eliminación de fotos. ¿Como se usa? Abre el album de fotos que subiste, pulsa F12 dirígete a la pestaña consola, pega el script y pulsa "Enter".
var urlFotoAnterior = "";
var interval = setInterval(function (){
try {
var urlFotoActual = document.getElementById("photo_image").getAttribute("src");
if (urlFotoActual != urlFotoAnterior)
{
urlFotoAnterior = urlFotoActual;
document.getElementById("photo-actions-remove").click();
document.querySelector("button.action.act-L.act-submit.acceptAction").click();
if (document.getElementById("album_progress_bar").style.width == "100%")
{
clearInterval(interval);
alert("Terminado");
}
}
} catch(e) {
console.log("ERROR: " + e);
}
}, 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment