Skip to content

Instantly share code, notes, and snippets.

@dnoseda
Created November 17, 2011 00:25
Show Gist options
  • Save dnoseda/1371984 to your computer and use it in GitHub Desktop.
Save dnoseda/1371984 to your computer and use it in GitHub Desktop.
9gaghate.js
javascript:(function(){var%20s=document.createElement("script");s.src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js";s.onload=function(){$("ul.actions").map(function(){var%20id=$(this).find("a.love").attr("rel");console.log(id);var%20button="<li><a%20rel=\""+id+"\"%20id=\"unlo-"+id+"\"%20class=\"unlove%20badge-vote-down\"%20href=\"#\"><span>Unlove</span></a></li>";$(this).append(button);});$("a.unlove").click(function(e){e.preventDefault();var%20id=$(this).attr("rel");$.get("http://9gag.com/vote/dislike/id/"+id,function(){$("#unlo-"+id).addClass("unloved");});});};document.body.appendChild(s);})()
@dnoseda
Copy link
Author

dnoseda commented Nov 17, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment