Skip to content

Instantly share code, notes, and snippets.

@ctide
Created December 1, 2010 21:16
Show Gist options
  • Save ctide/724241 to your computer and use it in GitHub Desktop.
Save ctide/724241 to your computer and use it in GitHub Desktop.
javascript console cmds to like the fuck out of everything
/// this first
function addJQuery(callback) {
  var script = document.createElement("script");
  script.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js");
  script.addEventListener('load', function() {
    var script = document.createElement("script");
    script.textContent = "(" + callback.toString() + ")();";
    document.body.appendChild(script);
  }, false);
  document.body.appendChild(script);
}
/// now this
function main() {
jQuery.each($('.like_link'), function() {
if ($(this).attr('name') == 'like') {
$(this).click();
}
})
jQuery.each($('.cmnt_like_link'), function() {
if ($(this).attr('title') == 'Like this comment') {
$(this).click();
}
})
}
/// then this!
addJQuery(main);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment