Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// ==UserScript==
// @name Twitter Enhancements: Press Ctrl + Enter to Send Update
// @namespace http://web.zgo.jp/
// @description Add keyboard shortcut,Ctrl + Enter, to send out update
// @include http://twitter.com/
// @include https://twitter.com/
// @author azu
// ==/UserScript==
// orignal http://userscripts.org/scripts/show/30419
var statusElem = document.getElementById('status');
statusElem.addEventListener('keypress', function(evt) {
if (evt.ctrlKey && evt.keyCode == 13){
statusElem.form.submit();
}
}, true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment