diff options
author | Aaron Parecki <aaron@parecki.com> | 2017-11-08 08:37:27 -0800 |
---|---|---|
committer | Aaron Parecki <aaron@parecki.com> | 2017-11-08 08:37:27 -0800 |
commit | 6448298d95565e209b9cec3f5387d90a5ddabced (patch) | |
tree | 778b0e9070d420c22fd986efd5a227aee19c0835 /views | |
parent | 97ba7d0347faa84a017cacb069e7ab45fd16c8dd (diff) |
updates for twitter 280 limit
Diffstat (limited to 'views')
-rw-r--r-- | views/new-post.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/views/new-post.php b/views/new-post.php index 7040308..a9fae60 100644 --- a/views/new-post.php +++ b/views/new-post.php @@ -37,7 +37,7 @@ </div> <div class="form-group"> - <div id="note_content_remaining" class="pcheck206"><img src="/images/twitter.ico"> <span>140</span></div> + <div id="note_content_remaining" class="pcheck206"><img src="/images/twitter.ico"> <span>280</span></div> <label for="note_content">Content</label> <textarea id="note_content" value="" class="form-control" style="height: 4em;"></textarea> </div> @@ -222,7 +222,7 @@ .pcheck206 { color: #6ba15c; } /* tweet fits within the limit even after adding RT @username */ .pcheck207 { color: #c4b404; } /* danger zone, tweet will overflow when RT @username is added */ -.pcheck200,.pcheck208 { color: #59cb3a; } /* exactly fits 140 chars, both with or without RT */ +.pcheck200,.pcheck208 { color: #59cb3a; } /* exactly fits 280 chars, both with or without RT */ .pcheck413 { color: #a73b3b; } /* over max tweet length */ .reply-context { @@ -529,8 +529,8 @@ $(function(){ $("#note_content").on('change keyup', function(e){ var text = $("#note_content").val(); var tweet_length = tw_text_proxy(text).length; - var tweet_check = tw_length_check(text, 140, "<?= $this->user->twitter_username ?>"); - var remaining = 140 - tweet_length; + var tweet_check = tw_length_check(text, 280, "<?= $this->user->twitter_username ?>"); + var remaining = 280 - tweet_length; $("#note_content_remaining span").html(remaining); $("#note_content_remaining").removeClass("pcheck200 pcheck206 pcheck207 pcheck208 pcheck413"); $("#note_content_remaining").addClass("pcheck"+tweet_check); @@ -568,6 +568,8 @@ $(function(){ // } // $("#note_category").val(category.join(", ")); + /* + // stop auto-populating usernames in replies, since Twitter no longer requires it if($("#note_content").val() == "" && data.mentions) { var mentions = ''; for(var i in data.mentions) { @@ -575,6 +577,7 @@ $(function(){ } $("#note_content").val(mentions); } + */ if(data.entry) { $(".reply-context .content").text(data.entry.content.text); |