Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.