Skip to content

Instantly share code, notes, and snippets.

@mfts
Created May 6, 2016 22:32
Show Gist options
  • Save mfts/830b6140912406b4dc67dccfb17d6118 to your computer and use it in GitHub Desktop.
Save mfts/830b6140912406b4dc67dccfb17d6118 to your computer and use it in GitHub Desktop.
// This little script lets you untag photos on Facebook. While only 10 at a time, I'm working on untagging multiple ones at once. Also you kinda have to preload, i.e. scroll down on the page, until as much tagged photos are loaded that you wish to iterate over.
// (1) Go to https://www.facebook.com/{YOURFACEBOOKIDHERE}/allactivity?log_filter=taggedphotos
// (2) Copy all JS from this page http://code.jquery.com/jquery-latest.min.js and
// (3) Paste into console
// (4) JQuery selectors $(..) are now available
// The following are lines to be entered into the console each at a time. (I was lazy)
var nameOfTagger = "Peter Pan";
// Iterate over all tags until tagger is found and then select until 10 tags are reached
for(i=0; i < $("._2o3s").length; i++){
if($("._2o3s")[i].nextSibling.children[1].children[0].children[1].innerHTML == nameOfTagger) {
$("._2o3s")[i].click(function(){
$("input:checkbox").attr('checked', true);
});
};
};
// Click "Remove Tag" button
$("#u_9z_1").click();
// Select "Remove Tag" radio input
$("ul._4kg")[0].firstChild.firstChild.firstChild.checked = true;
// Click "Untag" button
$("div._14")[0].firstChild.firstChild.click();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment