Created
December 1, 2010 21:16
-
-
Save ctide/724241 to your computer and use it in GitHub Desktop.
javascript console cmds to like the fuck out of everything
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
/// 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