Skip to content

Instantly share code, notes, and snippets.

@mapreal19
Last active November 14, 2015 13:11
Show Gist options
  • Save mapreal19/c374d966508e3512040a to your computer and use it in GitHub Desktop.
Save mapreal19/c374d966508e3512040a to your computer and use it in GitHub Desktop.
function check() {
fb_checks = document.querySelectorAll('a[role="checkbox"]');
for(i = 0; i < fb_checks.length; i++) {
if(fb_checks[i].getAttribute('aria-checked') == 'false') {
fb_checks[i].click();
}
}
}
var btn = document.createElement('button');
btn.id = 'hack-btn';
btn.innerText='INVITE';
//CSS styles
btn.setAttribute("style",
"position: fixed; top: 8px; left: 5px; z-index: 999; background-color: black; color: white; cursor: pointer");
document.body.appendChild(btn);
var button = document.querySelector('#hack-btn');
button.addEventListener('click', function() {check()}, false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment