1if($('.more_comment_read a').length > 0) { 2 var class_list = $('.more_comment_read a').attr('class').split(' '); 3 var get_class_list = ""; 4 //PIEãã¡ã¤ã«ã§IEã ã¨ã¯ã©ã¹ã追å ããããã 5 $.each(class_list, function(l,m){ 6 //classåã«pieã¤ãã®ã¯ã¯ãã 7 if(m.match(/^pie/)){ 8 } else{ 9 get_class_list += ' '+m; 10 } 11 }); 12 var type = get_class_list.split(' ').pop(); 13 if(type == 'mypage' || type == 'comment') { 14 var comment_type = 'user'; 15 } else { 16 var comment_type = type; 17 } 18 19 20 //ãã£ã¨è¦ãè¡¨ç¤ºåæ¿ 21 if(type != 'mypage') { 22 var cursor = 0; 23 if (type == 'topic') 24 cursor = 1; 25 if (type == 'community') 26 cursor = 1; 27 if (type == 'comment') 28 cursor = 1; 29 } else { 30 //ã¿ãåãæ¿ãå¯¾å¿ 31 var cate = $('#timeline ul li').attr('id').substring(4); 32 var cursor_all = 0; 33 var cursor_friend = 0; 34 var cursor_your = 0; 35 var cursor_reply = 0; 36 $('#timeline_tab li a').click(function(){ 37 cate = $(this).parent().attr('id').substring(4); 38 if(cate == "all_tweets" && cursor_all == 0 39 || cate == 'your_tweets' && cursor_your == 0 40 || cate != "all_tweets" && cate != 'your_tweets' && cursor_reply == 0){ 41 getComments(); 42 } 43 }); 44 } 45} 46 47$('.more_comment_read a').on('click',function () { 48 $(".add_stamp_timeline_box").hide(); 49 getComments(); 50}); 51function getComments(){ 52 if (typeof aync == "undefined") 53 async = true; 54 55 //apiæ¥ç¶å æ¯ãåã 56 if(type != 'mypage') { 57 var api = "/api/comments.json?id="+id+"&type="+type+"&cursor="+cursor; 58 }else { 59 //ãã¤ãã¼ã¸ã¿ãåãæ¿ãå¦ç 60 if(cate == "all_tweets"){ 61 var api = "/api/comments.json?type="+comment_type+"&cate="+cate+"&cursor="+cursor_all; 62 }else if(cate == 'your_tweets'){ 63 var api = "/api/comments.json?type="+comment_type+"&cate="+cate+"&cursor="+cursor_your; 64 }else{ 65 var api = "/api/comments.json?type="+comment_type+"&cate="+cate+"&cursor="+cursor_reply; 66 } 67 } 68 69 $.ajax({
70 type: "GET", 71 cache:false, 72 global: false, 73 async:async, 74 url: api, 75 success: function(data) { 76 if(type != 'mypage') { 77 cursor = data.cursor; 78 //ãã£ã¨è¦ãè¡¨ç¤ºåæ¿ 79 //if(cursor == data.total_page ) $('.more_comment_read').hide(); 80 } else { 81 if(cate == 'all_tweets') { 82 cursor_all = data.cursor; 83 if(cursor_all >= data.total_page ) $('#all_tweets .more_comment_read').hide(); 84 } else if(cate == 'your_tweets') { 85 cursor_your = data.cursor; 86 if(cursor_your >= data.total_page) $('#your_tweets .more_comment_read').hide(); 87 } else { 88 cursor_reply = data.cursor; 89 if(cursor_reply >= data.total_page) $('#reply_tweets .more_comment_read').hide(); 90 } 91 //ãã£ã¨è¦ãè¡¨ç¤ºåæ¿ 92 } 93 94 var html= ""; 95 var comment_user_profile = ""; 96 var community_add = ""; 97 var topic_add =""; 98 var res_div =""; 99 var login_div = ""; 100 var post_img = ""; 101 var res_post_img= ""; 102 var community_game_add = ""; 103 var community_file_add = ""; 104 var hidden_type = ""; 105 var res_name_add = ""; 106 var island_div = ""; 107 var com_delete = ""; 108 var com_res_count = ""; 109 var stamp_div = ""; 110
111 ////////////////// ãã¤ãã¼ã¸ã¨ãããã£ã¼ã«è©³ç´°ã®ãã£ã¨ã¿ãã¢ã¯ã·ã§ã³ start ///////////////////// 112 if(type == 'mypage' || type == 'profile') { 113 114 $.each(data.comments, function() { 115 //æ¹è¡ããã°è¿½å 116 var txt = this.body; 117 txt = txt.replace(/\r\n/g, '\n'); 118 txt = txt.replace(/\r/g, '\n'); 119 var line = txt.split('\n'); 120 var lines = ''; 121 for(var i = 0; i < line.length; i++) { 122 if(i == (line.length - 1)) { 123 lines += line[i]; 124 }else { 125 lines += line[i] + '<br />'; 126 } 127 } 128 this.body = lines; 129 130 //æ¹è¡ããã°è¿½å 131 if (this.title) { 132 var txt = this.title; 133 txt = txt.replace(/\r\n/g, '\n'); 134 txt = txt.replace(/\r/g, '\n'); 135 var line = txt.split('\n'); 136 var lines = ''; 137 for(var i = 0; i < line.length; i++) { 138 if(i == (line.length - 1)) { 139 lines += line[i]; 140 }else { 141 lines += line[i] + '<br />'; 142 } 143 } 144 this.title = lines; 145 } 146 //ã³ã¡ã³ããã人ã®ãããã£ã¼ã«ã¸ã®ãªã³ã¯å 追å 147 if (data.user == this.user_id && type != 'profile') { 148 //ãããã£ã¼ã«ç»é¢ã§ã¯åé¤ãã¿ã³åºããªã 149 com_delete = '<li class="delete_option"><form><input class="delete_my_tweet" type="submit" value="ãã®ã¤ã¶ãããåé¤ãã" /><input type="hidden" name="comment_id" value="'+this.comment_id+'" /><input type="hidden" name="fuel_csrf_token" value="'+fuel_csrf_token()+'"></form></li>'; 150 } else { 151 com_delete = ""; 152 } 153 154 //ã³ãã¥ããã£ç»å追å 155 if(this.community_file_path != "") { 156 community_file_add = '<img src="'+this.community_file_path['s']+'" alt="">'; 157 } 158 159 //ã³ãã¥ããã£ã¼è¿½å /ã²ã¼ã å追å 160 if (this.community_id) { 161 if (this.app_id) { 162 if (this.app_id != 55) { 163 community_add += '<li class="game_name"><a href="/games/game/'+this.app_id+'">'+community_file_add+this.community_name+'</a></li>'; 164 } 165 } else { 166 community_add = '<li class="game_name"><a href="/community/detail/'+this.community_id+'">'+community_file_add+this.community_name+'</a></li>'; 167 } 168 } else { 169 community_add = ""; 170 } 171 //ãããã¯è¿½å 172 if (this.topic_id) { 173 topic_add = '<li class="topic_name"><a href="/community/topic_detail/'+this.topic_id+'">'+this.topic_name+'</a></li>'; 174 } else { 175 topic_add = ""; 176 } 177 178 //ã³ã¡ã³ãã«ç»å追å ãã¦ãã¨ã 179 if (this.file_path) { 180 post_img = '<div class="timeline_contents_img"><a class="show_large" href="'+this.file_path['l']+'"><img src="'+this.file_path['s']+'"></a></div>'; 181 } else { 182 post_img = ""; 183 } 184 185 //ã³ã¡ã³ãè¿ä¿¡å ã®ã¦ã¼ã¶ã¼ãã¼ã åºã 186 if (this.res_comment_id && type != 'comment') { 187 res_name_add = '<li class="reply_to"><a href="/comment/detail/'+this.res_comment_id+'">'+this.res_nickname+'</a></li>'; 188 } else { 189 res_name_add = ""; 190 } 191 192 //å³¶ãã§ã㯠193 island_div =""; 194 if (this.island_flag && (type == 'community' || type == 'to
194pic')){ 195 // 管çå±ã¢ã«ã¦ã³ãä»¥å¤ 196 if (!whitelist.in_array(this.user_id)) { 197 island_div = '<li class="go_island_link"><a href="/profile/detail/'+this.user_id+'">å³¶</a></li>'; 198 } 199 } 200 201 if(this.res_count > 0) { 202 com_res_count = '<a href="/comment/detail/'+this.comment_id+'">ã³ã¡ã³ã('+this.res_count+')</a>'; 203 } else { 204 com_res_count = '<a href="/comment/detail/'+this.comment_id+'">ã³ã¡ã³ã</a>'; 205 } 206 207 //ãã©ã¼ã ã«å¿ è¦ãªhidden追å 208 switch(type) { 209 case 'community': 210 hidden_type = '<input type="hidden" name="type" value="community"><input type="hidden" name="community_id" value="'+this.community_id+'"><input type="hidden" name="res_comment_id" value="'+this.comment_id+'">'; 211 break; 212 case 'topic': 213 hidden_type = '<input type="hidden" name="type" value="topic"><input type="hidden" name="community_id" value="'+this.community_id+'"><input type="hidden" name="topic_id" value="'+this.topic_id+'"><input type="hidden" name="res_comment_id" value="'+this.comment_id+'">'; 214 break; 215 case 'mypage': 216 hidden_type = '<input type="hidden" name="type" value="user"><input type="hidden" name="res_comment_id" value="'+this.comment_id+'">'; 217 break; 218 case 'comment': 219 hidden_type = '<input type="hidden" name="type" value="detail_under"><input type="hidden" name="res_parent_comment_id" value="'+id+'"><input type="hidden" name="res_comment_id" value="'+this.comment_id+'">'; 220 } 221 222 //ãã©ã¼ã 追å 223 //if (data.login && type != 'profile') { 224 if (data.login && (type == 'community' || type == 'topic' || type == 'comment')){// || type == 'mypage')) { 225 login_div = '<div id="more_' + this.comment_id + '" class="your_reply clearfix">\ 226 <form action="/comment/comment_post_'+comment_type+'/" method="POST" enctype="multipart/form-data" class="form_comment_post">\ 227 <a class="user_img medium" href="/profile/detail/'+data.user+'"><img src="'+data.thumbnail['s']+'" alt="" /></a>\ 228 <textarea id="comment" name="comment" placeholder="'+this.nickname+'ããã«ã³ã¡ã³ã"></textarea>\ 229 <ul class="btn_group clearfix">\ 230 <li class="add_img"><span>ç»åã追å </span></li>\ 231 <li class="add_emoji"><span>çµµæåã追å </span></li>\ 232 <li><input class="btn_gray" type="button" value="ãã£ã³ã»ã«" /></li>\ 233 <li><input class="btn_orange mini" type="submit" value="ã³ã¡ã³ããã"></li>\ 234 </ul>\ 235 <div class="add_img_box">\ 236 <input type="file" name="file">\ 237 </div>\ 238 <div class="add_emoji_box">\ 239 </div>'+hidden_type+'<input type="hidden" name="fuel_csrf_token" value="'+fuel_csrf_token()+'">\ 240 </form>\ 241 </div>'; 242 243 } else { 244 login_div = ''; 245 } 246 //è¿ä¿¡ã追å 247 if (this.res_count != 0 && type != 'mypage' && this.res_data) {// 248 //ä¸èº«ã空ã«ããªãã¨åã®ãæ®ã£ã¦ã 249 res_div = ''; 250 $.each(this.res_data, function(){ 251 res_div += '<dl class="replies clearfix"><dt>'; 252 253 res_div += '<a class="user_img tiny" href=';
254 if (data.user == this.user_id) { 255 res_div += '"/mypage/"'; 256 } else { 257 res_div += '"/profile/detail/'+this.user_id+'"'; 258 } 259 res_div += '><img src="'+this.thumbnail['s']+'" alt="" />'+this.nickname+'</a>'; 260 261 //ã³ã¡ã³ãã«ç»å追å ãã¦ãã¨ã 262 if (this.file_path) { 263 res_post_img = '<a class="show_large" href="'+this.file_path['l']+'"><img src="'+this.file_path['s']+'"></a>'; 264 } else { 265 res_post_img = ""; 266 } 267 268 res_div += '</dt>\ 269 <dd>\ 270 <p class="clearfix">'+res_post_img+this.body+'</p>\ 271 </dd>\ 272 </dl>'; 273 }); 274 } else { 275 res_div = ''; 276 } 277 278 // ã¢ã¯ãã£ããã£å¤å® 279 if (this.badge_id || this.level || this.app_id) { 280 var dl_class = 'timeline_activity'; 281 var comment_body = '\ 282 <ul class="timeline_contents">'; 283 if (this.badge_id && this.badge_data) { 284 if (this.badge_data.hidden_flg != 0 && !data.accessor_badge_get_list[this.badge_id]) { 285 comment_body += '\ 286 <li class="clearfix">\ 287 <div class="timeline_contents_img">\ 288 <img src="'+img_domain+'/img/geso/badge/badge_on.png" alt="???????" />\ 289 </div>\ 290 <div class="right_text">\ 291 <p>'+this.nickname+'ãããä½ãé ãããã¸ãæã«å ¥ãããããï¼</p>\ 292 <span>é ãããã¸ï¼ç²å¾æ¡ä»¶ã¯ãããã</span>\ 293 </div>\ 294 </li>'; 295 } else { 296 comment_body += '\ 297 <li class="clearfix">\ 298 <div class="timeline_contents_img">\ 299 <a href="/achievement/detail/'+this.badge_id+'"><img src="'+img_domain+'/img/geso/badge/'+this.badge_data.image_s+'"></a>\ 300 </div>\ 301 <div class="right_text">\ 302 <p>'+this.nickname+'ãããã'+this.badge_data.name+'ãããã¸ãæã«å ¥ããï¼</p>\ 303 <span>'+this.badge_data.detail+'</span>\ 304 </div>\ 305 </li>'; 306 } 307 } else if (this.level && this.level_data) { 308 comment_body += '\ 309 <li class="clearfix">\ 310 <div class="timeline_contents_img">\ 311 <a href="/mypage/level/'+this.level+'"><img src="'+img_domain+'/img/geso/level/'+this.level_data.image_s+'"></a>\ 312 </div>\ 313 <div class="right_text">\ 314 <p>'+this.nickname+'ãããã¬ãã«'+this.level+'ã'+this.level_data.name+'ãã«ã¬ãã«ã¢ããï¼</p>\ 315 <span>'+this.level_data.message+'</span>\ 316 </div>\ 317 </li>'; 318 } else if (this.app_id) { 319 if (this.app_id != "60") { 320 comment_body += '\ 321 <li class="clearfix has_co_appid">\ 322 <div class="timeline_contents_img">'; 323 } else { 324 comment_body += '\ 325 <li class="clearfix">\ 326 <div class="timeline_contents_img">'; 327 } 328 if (this.img_url) { 329 comment_body += '\ 330 <img src="'+this.img_url+'">'; 331 } else if(this.community_file_path != "") { 332 if (this.app_id != 55) { 333 comment_body += '\ 334 <a href="/games/game/'+this.app_id+'">\ 335 <img src="'+this.community_file_path['m']+'" alt="">\ 336 </a>'; 337 } 338 } 339 comment_body += '\ 340 </div>\ 341 <div class="right_text">'; 342 if (this.title) { 343 comment_body += '\ 344 <p class="has_co_appid_title">'+this.title+'</p>'; 345 } 346 if (this.app_id == 8080) { 347 comment_body += '\ 348 <span class="has_co_appid_text">'+$('<div>').html(this.body).text()+'</span>\ 349 </div>\ 350 </li>'; 351 } else { 352 comment_body += '\ 353 <span class="has_co_appid_text">'+this.body+'</span>\ 354 </div>\ 355 </li>'; 356 } 357 } 358 comment_body += '</ul>'; 359 } else { 360 var dl_class = 'timeline_tweet'; 361 var comment_body = '\ 362 <ul class="timeline_contents">\ 363 <li class="clearfix">\ 364 '+post_img+'\ 365 <div class="right_text">'+this.body+'</div>\ 366 </li>\ 367 </ul>'; 368 } 369 370 371 var presents = ""; 372 if (this.is_friend || data.user==this.user_id
372) { 373 var onclick = 'makeLinkPresentList('+this.user_id+',this.parentNode, '+this.comment_id+','+this.is_friend+');return false;' 374 if (data.user==this.user_id) { 375 onclick=""; 376 } 377 var cnt = data.presents && data.presents[this.comment_id] ? data.presents[this.comment_id] : 0; 378 presents = '<a href="'+(data.user==this.user_id?'/profile/kizuna':"#")+'" class="open_gift present_btn" onclick="'+onclick+'"><img src="'+img_domain+'/img/spacer.gif"><span class="gift_count">'+cnt+'</span></a>'; 379 } 380 381 // ã¹ã¿ã³ã 382 if(this.stamp_file_path) { 383 stamp_div = '<div class="stamp_timeline">'; 384 if(this.stamp_app_id != 0) { 385 stamp_div += '<a href="/games/game/'+this.stamp_app_id+'" target="_blank">'; 386 } 387 stamp_div += '<img src="//img.gesoten.com/img/stamp/'+this.stamp_file_path+'" alt="'+this.stamp_group_name+'" title="'+this.stamp_group_name+'">'; 388 if(this.stamp_app_id != 0) { 389 stamp_div += '</a>'; 390 } 391 stamp_div += '</div>'; 392 } 393 394 //htmlã追å ãã¦ãã¨ãã 395 html += '\ 396 <dl class="tweet_list clearfix '+dl_class+'">\ 397 <dt class="loaded posted_user_img"><a class="user_img medium" href="/profile/detail/'+this.user_id+'"><img src="'+this.thumbnail['m']+'" alt="" /></a></dt>\ 398 <dd class="posted_tweet">\ 399 <div class="each_tweet_header clearfix">\ 400 <ul class="inner clearfix">\ 401 <li class="user_name"><a href="/profile/detail/'+this.user_id+'">'+this.nickname+'</a></li>\ 402 <li class="detail">\ 403 <ul class="clearfix">'+res_name_add+'\ 404 <li class="post_td">'+this.created_at+'</li>\ 405 <li class="cmts_count">'+com_res_count+'\ 406 </li>\ 407 </ul>\ 408 </li>\ 409 </ul>\ 410 </div>\ 411 '+comment_body+'\ 412 '+stamp_div+'\ 413 <div class="each_tweet_footer">\ 414 <ul class="clearfix">'+community_add+topic_add+com_delete+'</ul>\ 415 </div>\ 416 '+login_div+'\ 417 <div class="replies_list">'+res_div+'</div>\ 418 '+presents+'\ 419 </dd>\ 420 </dl>'; 421 422 //æ¯åä¸èº«ã空ã«ãã 423 comment_user_profile = ""; 424 community_add = ""; 425 topic_add =""; 426 res_div =""; 427 login_div = ""; 428 post_img = ""; 429 res_post_img= ""; 430 community_game_add = ""; 431 community_file_add = ""; 432 hidden_type = ""; 433 res_name_add = ""; 434 island_div = ""; 435 com_delete = ""; 436 com_res_count = ""; 437 dl_class = ""; 438 comment_body = ""; 439 stamp_div = ""; 440 }); 441
442 ////////////////// ãã¤ãã¼ã¸ã¨ãããã£ã¼ã«è©³ç´°ã®ãã£ã¨ã¿ãã¢ã¯ã·ã§ã³ end ///////////////////// 443 } else if (type == 'community') { 444 ////////////////// ã³ãã¥ããã£è©³ç´°ã®ãã£ã¨ã¿ãã¢ã¯ã·ã§ã³ start ///////////////////// 445 446 $.each(data.comments, function() { 447 //æ¹è¡ããã°è¿½å 448 var txt = this.body; 449 txt = txt.replace(/\r\n/g, '\n'); 450 txt = txt.replace(/\r/g, '\n'); 451 var line = txt.split('\n'); 452 var lines = ''; 453 for(var i = 0; i < line.length; i++) { 454 if(i == (line.length - 1)) { 455 lines += line[i]; 456 }else { 457 lines += line[i] + '<br />'; 458 } 459 } 460 this.body = lines; 461 //ã³ã¡ã³ããã人ã®ãããã£ã¼ã«ã¸ã®ãªã³ã¯å 追å 462 if (data.user == this.user_id && type != 'profile') { 463 //ãããã£ã¼ã«ç»é¢ã§ã¯åé¤ãã¿ã³åºããªã 464 com_delete = '<li class="delete_option"> <form><input class="delete_my_tweet btn_light_gray" type="submit" value="ãã®ã¤ã¶ããåé¤ãã" /><input type="hidden" name="comment_id" value="'+this.comment_id+'" /><input type="hidden" name="fuel_csrf_token" value="'+fuel_csrf_token()+'"></form></li>'; 465 } else { 466 com_delete = ""; 467 } 468 469 //ã³ãã¥ããã£ç»å追å 470 if(this.community_file_path != "") { 471 community_file_add = '<img src="'+this.community_file_path['s']+'">'+this.community_name; 472 } else { 473 community_file_add = this.community_name; 474 } 475 476 //ã³ãã¥ããã£ã¼è¿½å /ã²ã¼ã å追å 477 if (this.community_id) { 478 community_add = '<li class="game_name"><a href="/community/detail/'+this.community_id+'">'+community_file_add+'</a></li>'; 479 } else { 480 community_add = ""; 481 } 482 483 //ã³ã¡ã³ãã«ç»å追å ãã¦ãã¨ã 484 if (this.file_path) { 485 post_img = '<a class="show_large" href="'+this.file_path['l']+'"><img src="'+this.file_path['s']+'"></a>'; 486 } else { 487 post_img = ""; 488 } 489 490 491 island_div =""; 492 var block_div = ''; 493 // 管çå±ã¢ã«ã¦ã³ãä»¥å¤ 494 if (!whitelist.in_array(this.user_id)) { 495 //ãã¸ã¢ã³ãã§ã㯠496 //å³¶ãã§ãã¯(ãã£ã¦ãã¦ã¼ã¶ã¼ã¯ãªã³ã¯åºã) 497 if (this.island_flag){ 498 island_div = '<li class="go_island_link"><a href="/profile/detail/'+this.user_id+'"><img src="'+img_domain+'/img/spacer.gif" alt="ãã®äººã®å³¶ãè¦ã" />å³¶</a></span>'; 499 } 500 501 // ãããã¯éå ±ãã©ã¼ã 502 if (data.user && data.user != this.user_id) { 503 block_div = '<a href="#show_block" id="trigger_block" data-id="'+this.user_id+'"><i class="fa fa-ban"></i></a><a href="#show_report" id="trigger_report" data-id="'+this.comment_id+'"><i class="fa fa-frown-o"></i></a>'; 504 } 505 } 506 507 if(this.res_count > 0) { 508 com_res_count = '<a href="/comment/detail/'+this.comment_id+'">ã³ã¡ã³ã('+this.res_count+')</a>'; 509 } else { 510 com_res_count = '<a href="/comment/detail/'+this.comment_id+'">ã³ã¡ã³ã</a>'; 511 } 512 513 //ãã©ã¼ã ã«å¿ è¦ãªhidden追å 514 hidden_type = '<input type="hidden" name="type" value="community"><input type="hidden" name="community_id" value="'+this.community_id+'"><input type="hidden" name="res_comment_id" value="'+this.comment_id+'"><input type="hidden" name="stamp_id" class="stamp_timeline_item_id">'; 515 516 //ãã©ã¼ã 追å 517 if (data.login && type != 'profile') { 518 login_div = '<div id="more_' + this.comment_id + '" class="your_reply clearfix">\ 519 <form action="/comment/comment_post_'+comment_type+'/" method="POST" enctype="multipart/form-data" class="form_comment_post">\ 520 <a class="user_img medium" href="/profile/detail/'+data.user+'"><img src="'+data.thumbnail['s']+'" alt="ã¦ã¼ã¶ã¼ç»å" /></a>\ 521 <textarea class="input-xlarge" id="comment" name="comment" rows="1" placeholder="'+this.nickname+'ããã«ã³ã¡ã³ã"></textarea>\ 522 <ul class="btn_group clearfix">\ 523 <li class="add_img"><span>ç»åã追å </span></li>\ 524 <li class="add_emoji"><span>çµµæåã追å </span></li>\ 525 <li class="add_stamp_timeline"><span>ã¹ã¿ã³ãã追å </span><span class="stamp_timeline_selected_image" style="display:none;"><img width="26" height="26">鏿ä¸<i class="fa fa-times"></i></span></li>\ 526 <li><input class="btn_gray" type="button" value="ãã£ã³ã»ã«" /></li>\ 527 <li><input class="btn_orange" type="submit" value="è¿ä¿¡ãã"></li>\ 528 </ul>\ 529 <div class="add_img_box">\ 530 <input type="file" name="file">\ 531 </div>\ 532 <div class="add_emoji_box">\ 533 </div>\ 534 <div class="add_stamp_timeline_box">\ 535 <div class="close">×</div>\ 536 <div class="stamp_timeline_carouselwrap clearfix">\ 537 <div class="stamp_timeline_carousel">\ 538 <ul class="add_stamp_timeline_group">\ 539 </ul>\ 540 </div>\ 541 <div class="stamp_timeline_prev hide"><span class="stamp_arrow"><i class="fa fa-chevron-left"></i></span></div><div class="stamp_timeline_next hide"><span class="stamp_arrow"><i class="fa fa-chevron-right"></i></span></div>\ 542 </div>\ 543 <p class="stamp_areaborder"></p>\ 544 <ul class="add_stamp_timeline_item"></ul>\ 545 </div>\ 546 '+hidden_type+'<input type="hidden" name="fuel_csrf_token" value="'+fuel_csrf_token()+'">\ 547 </form>\ 548 </div>'; 549 550 } else { 551 login_div = ""; 552 } 553 //è¿ä¿¡ã追å 554 if (this.res_count != 0 && this.res_data) { 555 //ä¸èº«ã空ã«ããªãã¨åã®ãæ®ã£ã¦ã 556 res_div =""; 557 $.each(this.res_data, function(){ 558 res_div += '<dl class="replies clearfix"><dt>'; 559 560 res_div += '<a class="user_img tiny" href="/profile/detail/'+this.user_id+'"><img src="'+this.thumbnail['s']+'" alt="ã¦ã¼ã¶ã¼ç»å" />'+this.nickname+'</a>'; 561 562 //ã³ã¡ã³ãã«ç»å追å ãã¦ãã¨ã 563 if (this.file_path) { 564 res_post_img = '<a class="show_large" href="'+this.file_path['l']+'"><img src="'+this.file_path['s']+'"></a>'; 565 } else { 566 res_post_img = ""; 567 } 568 569 //ã³ã¡ã³ãã«ã¹ã¿ã³ã追å ãã¦ãã¨ã 570 if (this.stamp_file_path) { 571 res_stamp = '<div class="stamp_timeline">'; 572 if(this.stamp_app_id != 0) { 573 res_stamp += '<a href="/games/game/'+this.stamp_app_id+'" target="_blank">'; 574 } 575 res_stamp += '<img src="//img.gesoten.com/img/stamp/'+this.stamp_file_path+'" alt="'+this.stamp_group_name+'" title="'+this.stamp_group_name+'">'; 576 if(this.stamp_app_id != 0) { 577 res_stamp += '</a>'; 578 } 579 res_stamp += '</div>'; 580 } else { 581 res_stamp = ""; 582 } 583 584 res_div += '</dt>\ 585 <dd>\ 586 <p>'+res_post_img+this.body+res_stamp+'</p>\ 587 </dd>\ 588 </dl>'; 589 }); 590 } else { 591 res_div = '<dl class="replies clearfix"></dl>'; 592 } 593 594 var presents = ""; 595 if (this.is_friend || data.user==this.user_id
595) { 596 var onclick = 'makeLinkPresentList('+this.user_id+',this.parentNode, '+this.comment_id+','+this.is_friend+');return false;' 597 if (data.user==this.user_id) { 598 onclick=""; 599 } 600 var cnt = data.presents && data.presents[this.comment_id] ? data.presents[this.comment_id] : 0; 601 presents = '<a href="'+(data.user==this.user_id?'/profile/':"#")+'" class="open_gift present_btn" onclick="'+onclick+'"><img src="'+img_domain+'/img/spacer.gif"><span class="gift_count">'+cnt+'</span></a>'; 602 } 603 604 // ã¹ã¿ã³ã 605 if(this.stamp_file_path) { 606 stamp_div = '<div class="stamp_timeline">'; 607 if(this.stamp_app_id != 0) { 608 stamp_div += '<a href="/games/game/'+this.stamp_app_id+'" target="_blank">'; 609 } 610 stamp_div += '<img src="//img.gesoten.com/img/stamp/'+this.stamp_file_path+'" alt="'+this.stamp_group_name+'" title="'+this.stamp_group_name+'">'; 611 if(this.stamp_app_id != 0) { 612 stamp_div += '</a>'; 613 } 614 stamp_div += '</div>'; 615 } 616 617 //htmlã追å ãã¦ãã¨ãã 618 html += '<dt class="loaded posted_user_img">\ 619 <a class="user_img medium" href="/profile/detail/'+this.user_id+'"><img src="'+this.thumbnail['m']+'" alt="ã¦ã¼ã¶ã¼ç»å" /></a>\ 620 '+block_div+'\ 621 </dt>\ 622 <dd class="posted_tweet">\ 623 <div class="each_tweet_header clearfix">\ 624 <ul class="inner clearfix">\ 625 <li class="user_name">\ 626 <a href="/profile/detail/'+this.user_id+'" class="bbs_user_name user_id_'+this.user_id+'">'+this.nickname+'</a>\ 627 </li>\ 628 <li class="detail">\ 629 <ul class="clearfix">\ 630 <li class="post_td">'+this.created_at+'</li>\ 631 <li class="cmts_count">'+com_res_count+'</li>\ 632 </ul>\ 633 </li>\ 634 </ul>\ 635 </div>\ 636 <p>'+post_img+'<span id="comment_body_'+this.comment_id+'">'+this.body+'</span>'+stamp_div+'</p>\ 637 <div class="each_tweet_footer">\ 638 <ul class="clearfix">\ 639 '+island_div+community_add+com_delete+'\ 640 </ul>\ 641 </div>\ 642 '+login_div+'\ 643 <div class="replies_list">\ 644 '+res_div+'\ 645 </div>\ 646 '+presents+'\ 647 </dd>'; 648 649 //æ¯åä¸èº«ã空ã«ãã 650 comment_user_profile = ""; 651 community_add = ""; 652 topic_add =""; 653 res_div =""; 654 login_div = ""; 655 post_img = ""; 656 res_post_img= ""; 657 community_game_add = ""; 658 community_file_add = ""; 659 hidden_type = ""; 660 res_name_add = ""; 661 island_div = ""; 662 com_delete = ""; 663 com_res_count = ""; 664 stamp_div = ""; 665 });
666 ////////////////// ã³ãã¥ããã£è©³ç´°ã®ãã£ã¨ã¿ãã¢ã¯ã·ã§ã³ end ///////////////////// 667 } else { 668 ////////////////// ãããã¯è©³ç´°ã®ãã£ã¨ã¿ãã¢ã¯ã·ã§ã³ start ///////////////////// 669 670 $.each(data.comments, function() { 671 //æ¹è¡ããã°è¿½å 672 var txt = this.body; 673 txt = txt.replace(/\r\n/g, '\n'); 674 txt = txt.replace(/\r/g, '\n'); 675 var line = txt.split('\n'); 676 var lines = ''; 677 for(var i = 0; i < line.length; i++) { 678 if(i == (line.length - 1)) { 679 lines += line[i]; 680 }else { 681 lines += line[i] + '<br />'; 682 } 683 } 684 this.body = lines; 685 //ã³ã¡ã³ããã人ã®ãããã£ã¼ã«ã¸ã®ãªã³ã¯å 追å 686 if (data.user == this.user_id && type != 'profile') { 687 //ãããã£ã¼ã«ç»é¢ã§ã¯åé¤ãã¿ã³åºããªã 688 com_delete = '<form><input class="delete_my_tweet btn_light_gray" type="submit" value="ãã®ã¤ã¶ããåé¤ãã" /><input type="hidden" name="comment_id" value="'+this.comment_id+'" /><input type="hidden" name="fuel_csrf_token" value="'+fuel_csrf_token()+'"></form>'; 689 } else { 690 com_delete = ""; 691 } 692 693 //ã³ãã¥ããã£ç»å追å 694 if(this.community_file_path != "") { 695 community_file_add = '<img src="'+this.community_file_path['s']+'" alt="ã²ã¼ã ã¢ã¤ã³ã³"><a href="/community/detail/'+this.community_id+'">'+this.community_name+'</a>'; 696 } else { 697 community_file_add = '<a href="/community/detail/'+this.community_id+'">'+this.community_name+'</a>'; 698 } 699 700 //ã³ãã¥ããã£ã¼è¿½å /ã²ã¼ã å追å 701 if (this.community_id) { 702 community_add = '<li class="game_name"><a href="/community/detail/'+this.community_id+'">'+community_file_add+'</a></li>'; 703 } else { 704 community_add = ""; 705 } 706 //ãããã¯è¿½å 707 if (this.topic_id) { 708 topic_add = '<li><a href="/community/topic_detail/'+this.topic_id+'">'+this.topic_name+'</a></li>'; 709 } else { 710 topic_add = ""; 711 } 712 713 //ã³ã¡ã³ãã«ç»å追å ãã¦ãã¨ã 714 if (this.file_path) { 715 post_img = '<a class="show_large" href="'+this.file_path['l']+'"><img src="'+this.file_path['s']+'"></a>'; 716 } else { 717 post_img = ""; 718 } 719 720 //ã³ã¡ã³ãè¿ä¿¡å ã®ã¦ã¼ã¶ã¼ãã¼ã åºã 721 if (this.res_comment_id && type != 'comment') { 722 res_name_add = '<li class="reply_to"><a href="/comment/detail/'+this.res_comment_id+'">'+this.res_nickname+'</a></li>'; 723 } else { 724 res_name_add = ""; 725 } 726 727 island_div =""; 728 var block_div = ''; 729 // 管çå±ã¢ã«ã¦ã³ãä»¥å¤ 730 if (!whitelist.in_array(this.user_id)) { 731 //å³¶ãã§ãã¯(ãã£ã¦ãã¦ã¼ã¶ã¼ã¯ãªã³ã¯åºã) 732 if (this.island_flag && (type == 'community' || type == 'topic')){ 733 island_div = '<span class="go_island_link"><a href="/profile/detail/'+this.user_id+'"><img src="'+img_domain+'/img/spacer.gif" alt="ãã®äººã®å³¶ãè¦ã" />å³¶</a></span>'; 734 } 735 736 // ãããã¯éå ±ãã©ã¼ã 737 if (data.user && data.user != this.user_id
737) { 738 block_div = '<a href="#show_block" id="trigger_block" data-id="'+this.user_id+'"><i class="fa fa-ban"></i></a><a href="#show_report" id="trigger_report" data-id="'+this.comment_id+'"><i class="fa fa-frown-o"></i></a>'; 739 } 740 } 741 742 if(this.res_count > 0) { 743 com_res_count = '<a href="/comment/detail/'+this.comment_id+'">ã³ã¡ã³ã('+this.res_count+')</a>'; 744 } else { 745 com_res_count = '<a href="/comment/detail/'+this.comment_id+'">ã³ã¡ã³ã</a>'; 746 } 747 748 //ãã©ã¼ã ã«å¿ è¦ãªhidden追å 749 switch(type) { 750 case 'community': 751 hidden_type = '<input type="hidden" name="type" value="community"><input type="hidden" name="community_id" value="'+this.community_id+'"><input type="hidden" name="res_comment_id" value="'+this.comment_id+'">'; 752 break; 753 case 'topic': 754 hidden_type = '<input type="hidden" name="type" value="topic"><input type="hidden" name="community_id" value="'+this.community_id+'"><input type="hidden" name="topic_id" value="'+this.topic_id+'"><input type="hidden" name="res_comment_id" value="'+this.comment_id+'"><input type="hidden" name="stamp_id" class="stamp_timeline_item_id">'; 755 break; 756 case 'mypage': 757 hidden_type = '<input type="hidden" name="type" value="user"><input type="hidden" name="res_comment_id" value="'+this.comment_id+'">'; 758 break; 759 case 'comment': 760 hidden_type = '<input type="hidden" name="type" value="detail_under"><input type="hidden" name="res_parent_comment_id" value="'+id+'"><input type="hidden" name="res_comment_id" value="'+this.comment_id+'"><input type="hidden" name="stamp_id" class="stamp_timeline_item_id">'; 761 } 762 763 //ãã©ã¼ã 追å 764 if (data.login && type != 'profile') { 765 login_div = '<div id="more_' + this.comment_id + '" class="your_reply clearfix">\ 766 <form action="/comment/comment_post_'+comment_type+'/" method="POST" enctype="multipart/form-data" class="form_comment_post">\ 767 <a class="user_img medium" href="/profile/detail/'+data.user+'"><img src="'+data.thumbnail['s']+'" alt="ã¦ã¼ã¶ã¼ç»å" /></a>\ 768 <textarea id="comment" name="comment" placeholder="'+this.nickname+'ããã«ã³ã¡ã³ã"></textarea>\ 769 <ul class="btn_group clearfix">\ 770 <li class="add_img"><span>ç»åã追å </span></li>\ 771 <li class="add_emoji"><span>çµµæåã追å </span></li>\ 772 <li class="add_stamp_timeline"><span>ã¹ã¿ã³ãã追å </span><span class="stamp_timeline_selected_image" style="display:none;"><img width="26" height="26">鏿ä¸<i class="fa fa-times"></i></span></li>\ 773 <li><input class="btn_gray" type="button" value="ãã£ã³ã»ã«" /></li>\ 774 <li><input class="btn_orange" type="submit" value="è¿ä¿¡ãã"></li>\ 775 </ul>\ 776 <div class="add_img_box">\ 777 <input type="file" name="file">\ 778 </div>\ 779 <div class="add_emoji_box">\ 780 </div>\ 781 <div class="add_stamp_timeline_box">\ 782 <div class="close">×</div>\ 783 <div class="stamp_timeline_carouselwrap clearfix">\ 784 <div class="stamp_timeline_carousel">\ 785 <ul class="add_stamp_timeline_group">\ 786 </ul>\ 787 </div>\ 788 <div class="stamp_timeline_prev hide"><span class="stamp_arrow"><i class="fa fa-chevron-left"></i></span></div><div class="stamp_timeline_next hide"><span class="stamp_arrow"><i class="fa fa-chevron-right"></i></span></div>\ 789 </div>\ 790 <p class="stamp_areaborder"></p>\ 791 <ul class="add_stamp_timeline_item"></ul>\ 792 </div>\ 793 '+hidden_type+'<input type="hidden" name="fuel_csrf_token" value="'+fuel_csrf_token()+'">\ 794 </form>\ 795 </div>'; 796 797 } else { 798 login_div = ""; 799 } 800 //è¿ä¿¡ã追å 801 if (this.res_count != 0 && this.res_data) { 802 //ä¸èº«ã空ã«ããªãã¨åã®ãæ®ã£ã¦ã 803 res_div =""; 804 $.each(this.res_data, function(){ 805 res_div += '<dl class="replies clearfix"><dt>'; 806 807 res_div += '<a class="user_img tiny" href="/profile/detail/'+this.user_id+'"><img src="'+this.thumbnail['s']+'" alt="ã¦ã¼ã¶ã¼ç»å" />'+this.nickname+'</a>'; 808 809 //ã³ã¡ã³ãã«ç»å追å ãã¦ãã¨ã 810 if (this.file_path) { 811 res_post_img = '<a class="show_large" href="'+this.file_path['l']+'"><img src="'+this.file_path['s']+'"></a>'; 812 } else { 813 res_post_img = ""; 814 } 815 816 //ã³ã¡ã³ãã«ã¹ã¿ã³ã追å ãã¦ãã¨ã 817 if (this.stamp_file_path) { 818 res_stamp = '<div class="stamp_timeline">'; 819 if(this.stamp_app_id != 0) { 820 res_stamp += '<a href="/games/game/'+this.stamp_app_id+'" target="_blank">'; 821 } 822 res_stamp += '<img src="//img.gesoten.com/img/stamp/'+this.stamp_file_path+'" alt="'+this.stamp_group_name+'" title="'+this.stamp_group_name+'">'; 823 if(this.stamp_app_id != 0) { 824 res_stamp += '</a>'; 825 } 826 res_stamp += '</div>'; 827 } else { 828 res_stamp = ""; 829 } 830 831 res_div += '</dt>\ 832 <dd>\ 833 <p>'+res_post_img+this.body+res_stamp+'</p>\ 834 </dd>\ 835 </dl>'; 836 }); 837 } else { 838 res_div = '<dl class="replies clearfix"></dl>'; 839 } 840 841 var presents = ""; 842 if (this.is_friend || data.user==this.user_id
842) { 843 var onclick = 'makeLinkPresentList('+this.user_id+',this.parentNode, '+this.comment_id+','+this.is_friend+');return false;' 844 if (data.user==this.user_id) { 845 onclick=""; 846 } 847 var cnt = data.presents && data.presents[this.comment_id] ? data.presents[this.comment_id] : 0; 848 presents = '<a href="'+(data.user==this.user_id?'/profile/kizuna':"#")+'" class="open_gift present_btn" onclick="'+onclick+'"><img src="'+img_domain+'/img/spacer.gif"><span class="gift_count">'+cnt+'</span></a>'; 849 } 850 851 // ã¹ã¿ã³ã 852 if(this.stamp_file_path) { 853 stamp_div = '<div class="stamp_timeline">'; 854 if(this.stamp_app_id != 0) { 855 stamp_div += '<a href="/games/game/'+this.stamp_app_id+'" target="_blank">'; 856 } 857 stamp_div += '<img src="//img.gesoten.com/img/stamp/'+this.stamp_file_path+'" alt="'+this.stamp_group_name+'" title="'+this.stamp_group_name+'">'; 858 if(this.stamp_app_id != 0) { 859 stamp_div += '</a>'; 860 } 861 stamp_div += '</div>'; 862 } 863 864 //htmlã追å ãã¦ãã¨ãã 865 html += '<dt class="loaded posted_user_img">\ 866 <a class="user_img medium" href="/profile/detail/'+this.user_id+'"><img src="'+this.thumbnail['m']+'" alt="ã¦ã¼ã¶ã¼ç»å" /></a>\ 867 '+block_div+'\ 868 </dt>\ 869 <dd class="posted_tweet">\ 870 <span class="post_td">'+this.created_at+'</span>\ 871 <a href="/profile/detail/'+this.user_id+'" class="bbs_user_name user_id_'+this.user_id+'">'+this.nickname+'</a>\ 872 '+island_div+'\ 873 <div class="posted_tweet_body clearfix"><span id="comment_body_'+this.comment_id+'">'+this.body+'</span>'+stamp_div+post_img+com_delete+'</div>\ 874 '+login_div+'\ 875 <div class="replies_list">'+res_div+'</div>\ 876 '+presents+'\ 877 </dd>'; 878 879 //æ¯åä¸èº«ã空ã«ãã 880 comment_user_profile = ""; 881 community_add = ""; 882 topic_add =""; 883 res_div =""; 884 login_div = ""; 885 post_img = ""; 886 res_post_img= ""; 887 community_game_add = ""; 888 community_file_add = ""; 889 hidden_type = ""; 890 res_name_add = ""; 891 island_div = ""; 892 com_delete = ""; 893 com_res_count = ""; 894 stamp_div = ""; 895 });
896 ////////////////// ãããã¯è©³ç´°ã®ãã£ã¨ã¿ãã¢ã¯ã·ã§ã³ end ///////////////////// 897 } 898 899 if(type == 'mypage') { 900 $('#'+cate+' .timeline_append_span').append(html); 901 } else if(type == 'profile') { 902 $('.timeline_append_span').append(html); 903 } else { 904 $('.tweet_list').append(html); 905 Comment.Action.SetStamp(); 906 } 907 $(".loaded").next().find("textarea").charCount(); 908 //hoveræã«title屿§ããã¼ã«ãããå 909 $(".stamp_timeline img").tipTip({ 910 delay: 100, 911 defaultPosition: "bottom" 912 }); 913 }, 914 error: function(XMLHttpRequest, textStatus, errorThrown) { 915 this; 916 //alert('Error:' + errorThrown); 917 } 918 }); 919 920}; 921 922 923//ã³ã¡ã³ãåé¤ãã¿ã³ã¯ãªã㯠924$(document).on("click", ".delete_my_tweet", function(){ 925 var is_parent = $(this).next().next().next().val(); 926 var data = {comment_id : $(this).next().val(),fuel_csrf_token : $(this).next().next().val()}; 927 //ã³ã¡ã³ãæ¬ç©ºã®æã¯éããªãããã« 928 if(data.comment_id == null) return false; 929 $.ajax({
930 type:'POST', 931 url:'/api/delete_comments', 932 data: data, 933 success: function(data, dataType) { 934 if (is_parent) { 935 location.href = "/mypage"; 936 } else { 937 document.location.reload(true); 938 } 939 }, 940 error: function(XMLHttpRequest, textStatus, errorThrown) { 941 this; 942 //alert('Error:' + errorThrown); 943 } 944 }); 945 $('form').submit(function(){ 946 return false; 947 }); 948}); 949 950//ã³ã¡ã³ãæ¢èªã«ãã 951$("#show_cmts a").click(function(){ 952 var count = $('#show_cmts a strong').text(); 953 if(count != 0) read_status(); 954}); 955 956$("#tab_reply_tweets").click(function(){ 957 var count = $('#tab_reply_tweets a strong').text(); 958 if(count != 0) read_status(); 959}); 960 961//ã³ã¡ã³ãæ¢èªclickã¤ãã³ãã«å¼æ°è¤æ°æå®ã®ä»æ¹ãããããªã 962function read_status() { 963 $.ajax({ 964 type:'POST', 965 url:'/api/read_status', 966 data: null, 967 success: function(data, dataType) { 968 //$('#show_cmts a strong').text('0'); 969 $('#tab_reply_tweets a strong').remove(); 970 }, 971 error: function(XMLHttpRequest, textStatus, errorThrown) { 972 this; 973 //alert('Error:' + errorThrown); 974 } 975 }); 976} 977 978$(function(){ 979 $('#activity_btn').click(function() { 980 if ($("#ActivitySetting").css("display") == "block") { 981 $("#ActivitySetting").hide(); 982 } else { 983 $("#ActivitySetting").show(); 984 } 985 return false; 986 }); 987}); 988 989$(function(){ 990 $('#activity_form').submit(function() { 991 var activity_user = []; 992 var activity_app = []; 993 $("[name='activity_user[]']:checked").each(function(){ 994 activity_user.push(this.value); 995 }); 996 $("[name='activity_app[]']:checked").each(function(){ 997 activity_app.push(this.value); 998 }); 999 $.ajax({
1000 type:'POST', 1001 url:'/api/comment_activity', 1002 data: { 1003 'activity_user':activity_user, 1004 'activity_app':activity_app 1005 }, 1006 success: function(data, dataType) { 1007 $('#ActivitySetting').hide(); 1008 if(data.status == 'success') { 1009 alert("è¨å®ã夿´ãã¾ããã\nåæ ãããã¾ã§æéãããããã¨ãããã¾ãã"); 1010 } else { 1011 var code = data.code; 1012 alert("ã¨ã©ã¼ãçºçãã¾ããã\nå度æéãããã¦è¨å®ãã¦ãã ããã\nã¨ã©ã¼ã³ã¼ã : "+code); 1013 } 1014 }, 1015 error: function(XMLHttpRequest, textStatus, errorThrown) { 1016 this; 1017 } 1018 }); 1019 return false; 1020 }); 1021 1022 $('.form_comment_post').on('submit', function(event) { 1023 var comment = $(this).find('*[name=comment]').val(); 1024 var stamp_id = $(this).find('*[name=stamp_id]').val(); 1025 if (!comment && !stamp_id) { 1026 event.preventDefault(); 1027 return false; 1028 } 1029 }); 1030});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.