Improve F shortcut visual feedback for already favorited posts

This commit is contained in:
Toks
2013-08-29 21:19:58 -04:00
parent bbcc6783ab
commit cb7eca9ffb

View File

@@ -301,7 +301,11 @@
});
$(document).bind("keypress", "f", function(e) {
$("#add-to-favorites:visible").trigger("click");
if ($("#add-to-favorites").is(":visible")) {
$("#add-to-favorites").click();
} else {
Danbooru.notice("You have already favorited this post")
}
e.preventDefault();
});
}