Browse Source

insignificant optimization of vars in postSubmit()

readme-update
Simon Grim 9 years ago
parent
commit
0b68a00481
  1. 7
      js/interface_common.js

7
js/interface_common.js

@ -1570,9 +1570,8 @@ function postSubmit(e, oldLastPostId) {
$(textArea[0]).remove(); $(textArea[0]).remove();
oldLastPostId = lastPostId;
doSubmitPost(postText, postData); doSubmitPost(postText, postData);
setTimeout(postSubmit, 1000, btnPostSubmit, oldLastPostId); setTimeout(postSubmit, 1000, btnPostSubmit, lastPostId);
return; return;
} }
@ -1581,9 +1580,7 @@ function postSubmit(e, oldLastPostId) {
closePrompt(); closePrompt();
else { else {
textArea.val('').attr('placeholder', polyglot.t('Your message was sent!')); textArea.val('').attr('placeholder', polyglot.t('Your message was sent!'));
var tweetForm = btnPostSubmit.closest('form'); btnPostSubmit.closest('form').find('.post-area-remaining').text('140');
var remainingCount = tweetForm.find('.post-area-remaining');
remainingCount.text(140);
if (btnPostSubmit.closest('.post-area,.post-reply-content')) { if (btnPostSubmit.closest('.post-area,.post-reply-content')) {
$('.post-area-new').removeClass('open').find('textarea').blur(); $('.post-area-new').removeClass('open').find('textarea').blur();

Loading…
Cancel
Save