Created
June 11, 2012 20:31
-
-
Save jan-matejka/2912487 to your computer and use it in GitHub Desktop.
remove all applications from your facebook (execute in browser console)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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