Skip to content

Instantly share code, notes, and snippets.

@jarinudom
Created April 17, 2015 16:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jarinudom/d1b84a318e471989c2ef to your computer and use it in GitHub Desktop.
Save jarinudom/d1b84a318e471989c2ef to your computer and use it in GitHub Desktop.
Github quick submit
$(document).onFocusedKeydown(".js-quick-submit", function() {
return function(t) {
var e, n;
return "ctrl+enter" === t.hotkey || "meta+enter" === t.hotkey ? (n = $(this).closest("form"), e = n.find("input[type=submit], button[type=submit]").first(), e.prop("disabled") || n.submit(), !1) : void 0
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment