Created
October 19, 2014 12:58
-
-
Save iirelu/cbee5447e97830e39d3a to your computer and use it in GitHub Desktop.
Bookmarklet to make a Weasyl submission use an AJAX favourite button
This file contains 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
javascript:(function() { | |
var form = $("[name=favorite]"); | |
form.click(function(e) { | |
e.preventDefault(); | |
$.ajax("/favorite", { type: "POST", data: form.serialize() }); | |
form.children("button").addClass("active").append("d"); | |
}); | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment