Skip to content

Instantly share code, notes, and snippets.

@jan-matejka
Created June 11, 2012 20:31
Show Gist options
  • Select an option

  • Save jan-matejka/2912487 to your computer and use it in GitHub Desktop.

Select an option

Save jan-matejka/2912487 to your computer and use it in GitHub Desktop.
remove all applications from your facebook (execute in browser console)
function confirmRemove() {
var allElements = document.getElementsByTagName('input');
for (var i = 0; i < allElements.length; i++)
{
if (allElements[i].getAttribute('type') == 'button') {
if (allElements[i].getAttribute('name') == 'remove') {
allElements[i].click()
}}}}
function rm(el) {
el.click()
confirmRemove()
}
function getRemoves(fn)
{
var allElements = document.getElementsByTagName('input');
for (var i = 0; i < allElements.length; i++)
{
if (allElements[i].getAttribute('title') == 'Remove')
{
fn(allElements[i])
}}}
getRemoves(rm);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment