Skip to content
Browse files

Adjust shorten URL length with https.

  • Loading branch information...
1 parent cea102c commit 0ef13998f92aed418eb617694d329b372c384bfd @watagashi watagashi committed Jan 7, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 twicli.js
View
2 twicli.js
@@ -577,7 +577,7 @@ function updateCount() {
// for calculate length with shorten URL.
var s = $("fst").value.replace(
/https?:\/\/[^\/\s]*[\w!#$%&'()*+,.\/:;=?@~-]+(?=&\w+;)|https?:\/\/[^\/\s]*[\w!#$%&'()*+,.\/:;=?@~-]+/g,
- function(t) {return t_co_maxstr + (t.substr(t.length-1) == ')' ? ')' : '');});
+ function(t) {return t_co_maxstr.replace(/^http/, t.substr(0, t.indexOf(':'))) + (t.substr(t.length-1) == ')' ? ')' : '')});
$("counter").innerHTML = 140 - footer.length - s.length;
}
// フォームの初期化

0 comments on commit 0ef1399

Please sign in to comment.
Something went wrong with that request. Please try again.