Browse Source

autofill the note content with the username being replied to

pull/37/head
Aaron Parecki 9 years ago
parent
commit
42a5e44d17
  1. 1
      controllers/controllers.php
  2. 10
      views/new-post.php

1
controllers/controllers.php

@ -56,7 +56,6 @@ $app->get('/new', function() use($app) {
$params = $app->request()->params();
$entry = false;
$photo_url = false;
$in_reply_to = '';
if(array_key_exists('reply', $params))

10
views/new-post.php

@ -143,6 +143,16 @@ $(function(){
$("#note_content_remaining").addClass("pcheck"+tweet_check);
});
$("#note_in_reply_to").on('change', function(){
if(match=$("#note_in_reply_to").val().match(/twitter\.com\/([^\/]+)\/status/)) {
$("#note_content").val( "@"+match[1]+" "+$("#note_content").val() );
}
});
if($("#note_in_reply_to").val() != "") {
$("#note_in_reply_to").change();
}
// ctrl-s to save
$(window).on('keydown', function(e){
if(e.keyCode == 83 && e.ctrlKey){

Loading…
Cancel
Save