Skip to content

Instantly share code, notes, and snippets.

@mustafaakin
Last active June 27, 2016 22:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mustafaakin/9bae0d456515ace0d1201cd43804f2ef to your computer and use it in GitHub Desktop.
Save mustafaakin/9bae0d456515ace0d1201cd43804f2ef to your computer and use it in GitHub Desktop.
function perform() {
console.log("Finding button")
$($("._4xev")[1]).click();
setTimeout(function() {
$(".uiContextualLayer").each(function() {
var b = $(this).is(':visible');
if (b) {
var t = $(this).find("._54nh");
var a = {};
t.each(function() {
var txt = $(this).text().trim();
a[txt] = $(this);
})
var chosen = null;
console.log(a);
chosen = a["Delete"] || a["Hide from Timeline"];
console.log(chosen.text());
if (chosen) {
chosen.click();
setTimeout(function() {
$(".layerConfirm").click();
setTimeout(function(){
$("._42ft").each(function(){
var t = $(this).text().trim();
if ( t == "Close"){
$(this).click();
}
});
}, 1000);
setTimeout(function() {
perform();
}, 3000);
}, 3000);
}
}
});
},3000);
}
perform();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment