Is it possible to make the enter key submit a tweet automatically on Twitter?
If so, how?
Is it possible to make the enter key submit a tweet automatically on Twitter?
If so, how?
It is not possible to use enter to submit the new tweet on Twitter.com. By default it creates a line break, even if line breaks are not displayed by Twitter.com and most apps.
The fastest way to post a tweet using your keyboard is the following:
Here's the solution I came up with (thanks to this post). You can download the full Greasemonkey script here.
setInterval (function() { checkForTweetbox (); }, 500);
function checkForTweetbox () {
var tweetbox = document.querySelector ('div.tweet-box textarea'); //check for new tweet window
if (tweetbox) {
if (! tweetbox.weHaveProcessed) {
tweetbox.weHaveProcessed = true;
// alert ('New tweet-box found!');
}
}
tweetbox.onkeydown = function(event){
if(event.keyCode == 13){ //13 = Enter keycode
document.querySelector ('a.primary-btn').click(); //there must be at least one character in the textarea
}
}
}