Changeset 39115
- Timestamp:
- 02/16/12 00:29:49 (15 months ago)
- Files:
-
- 1 modified
-
websites/twicli/twicli.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
websites/twicli/twicli.js
r39114 r39115 583 583 // for calculate length with shorten URL. 584 584 var s = $("fst").value.replace( 585 /https?:\/\/[^\/\s]*[\w!#$%& '()*+,.\/:;=?@~-]+(?=&\w+;)|https?:\/\/[^\/\s]*[\w!#$%&'()*+,.\/:;=?@~-]+/g,586 function(t) {return t_co_maxstr.replace(/^http/, t.substr(0, t.indexOf(':'))) + (t.substr(t.length-1) == ')' ? ')' : '')});585 /https?:\/\/[^\/\s]*[\w!#$%&\'()*+,.\/:;=?~-]*[\w#\/+-]/g, 586 function(t) {return t_co_maxstr.replace(/^http/, t.substr(0, t.indexOf(':')))}); 587 587 $("counter").innerHTML = 140 - footer.length - s.length; 588 588 } … … 840 840 //本文 (https〜をリンクに置換 + @を本家リンク+JavaScriptに置換) 841 841 " <span id=\"text-" + eid + "\" class=\"status\">" + 842 text.replace(/https?:\/\/[^\/\s]*[\w!#$%& '()*+,.\/:;=?@~-]+(?=&\w+;)|https?:\/\/[^\/\s]*[\w!#$%&'()*+,.\/:;=?@~-]+|[@@](\w+(?:\/[\w-]+)?)|([,.!? 、。!?「」]|\s|^)([##])([\w々ぁ-ゖァ-ヺーㄱ-ㆅ㐀-\u4DBF一-\u9FFF가-\uD7FF\uF900-\uFAFF0-9A-Za-zヲ-゚]+)(?=[^\w々ぁ-ゖァ-ヺーㄱ-ㆅ㐀-\u4DBF一-\u9FFF가-\uD7FF\uF900-\uFAFF0-9A-Za-zヲ-゚]|$)/g, function(_,u,x,h,s){842 text.replace(/https?:\/\/[^\/\s]*[\w!#$%&\'()*+,.\/:;=?~-]*[\w#\/+-]|[@@](\w+(?:\/[\w-]+)?)|([,.!? 、。!?「」]|\s|^)([##])([\w々ぁ-ゖァ-ヺーㄱ-ㆅ㐀-\u4DBF一-\u9FFF가-\uD7FF\uF900-\uFAFF0-9A-Za-zヲ-゚]+)(?=[^\w々ぁ-ゖァ-ヺーㄱ-ㆅ㐀-\u4DBF一-\u9FFF가-\uD7FF\uF900-\uFAFF0-9A-Za-zヲ-゚]|$)/g, function(_,u,x,h,s){ 843 843 if (!u && !h) { 844 var paren = '';845 _ = _.replace(/[\W_]+$/,function(p){ // 末尾の記号類はURLに含めない846 paren = p;847 return '';848 });849 844 if (expanded_urls[_]) { 850 845 t.text_replaced = (t.text_replaced || t.text).replace(_, expanded_urls[_]); 851 846 _ = expanded_urls[_]; 852 847 } 853 return "<a class=\"link\" target=\"_blank\" href=\""+_.replace(/\"/g, '%22')+"\" onclick=\"return link(this);\">"+_ +"</a>"+paren;848 return "<a class=\"link\" target=\"_blank\" href=\""+_.replace(/\"/g, '%22')+"\" onclick=\"return link(this);\">"+_.replace(/&/g, '&')+"</a>"; 854 849 } 855 850 if (h == "#" || h == "#") { … … 1060 1055 // 受信tweetを表示 1061 1056 function removeLink(text) { 1062 return text.replace(/https?:\/\/[^\/\s]*[\w!#$%&\'()*+,.\/:;=? @~-]+/g, '');1057 return text.replace(/https?:\/\/[^\/\s]*[\w!#$%&\'()*+,.\/:;=?~-]*[\w#\/+-]/g, ''); 1063 1058 } 1064 1059 function twShow(tw) {
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)