Changeset 18407
- Timestamp:
- 08/29/08 01:21:37 (4 months ago)
- Files:
-
- 1 modified
-
websites/twicli/twicli.html (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
websites/twicli/twicli.html
r18348 r18407 31 31 .lock { position: relative; top: 2px; left: 0; } 32 32 .close { color: red; } 33 #next { text-align: center; background-color: #999; color: #fec; cursor: pointer; } 33 34 #rep { display: none; background-color: #fee; position: absolute; width: 90%; left: 4%; top: 200px; border: #666 4px solid; z-index: 2; padding: 2px; font-size: small; } 34 35 #user_info { margin: 1px; border: #888 solid 1px: } … … 157 158 $("loading").style.display = "block"; 158 159 rep_top = cumulativeOffset(ele)[1] + 20; 159 reply_ele = loadXDomainScript('http://twitter.com/statuses/show/'+id+'.json? seq='+(seq++)+'&callback=dispReply2', reply_ele);160 reply_ele = loadXDomainScript('http://twitter.com/statuses/show/'+id+'.json?callback=dispReply2', reply_ele); 160 161 return; 161 162 } … … 277 278 // 受信twitを表示 278 279 function twShow(tw) { 279 twShowToNode(tw, $("tw"), false, true, true);280 twShowToNode(tw, $("tw"), false, false, true, true); 280 281 } 281 282 function twShow2(tw) { 282 283 var user_info = $("user_info"); 283 if (user_info && tw.length > 0) { 284 var tmp = $("tmp"); 285 if (tmp) tmp.parentNode.removeChild(tmp); 286 if (cur_page == 1 && user_info && tw.length > 0) { 284 287 var user = tw[0].user; 285 288 user_info.innerHTML = '<table><tr><td><img align="left" src="' + user.profile_image_url + '"></td><td>' + … … 293 296 '&user_a=' + myname + '&user_b=' + user.screen_name + '&callback=twFollow', update_ele2); 294 297 } 295 twShowToNode(tw, $("tw2c"), !!user_info); 296 } 297 function twShowToNode(tw, twNode, no_name, animation, check_since) { 298 twShowToNode(tw, $("tw2c"), !!user_info, cur_page > 1); 299 if (selected_menu.id == "reply" || selected_menu.id == "user") 300 $("tw2c").innerHTML += '<div onClick="getNext(this)" id="next">▽</div>'; 301 } 302 function twShowToNode(tw, twNode, no_name, after, animation, check_since) { 298 303 $('loading').style.display = 'none'; 299 304 if (failover_timeout) clearTimeout(failover_timeout); … … 304 309 var dummy = pNode.appendChild(document.createElement('div')); 305 310 for (var i = len-1; i >= 0; i--) { 306 if (check_since && since_id && since_id >= tw[i].id )311 if (check_since && since_id && since_id >= tw[i].id || $(twNode.id + "-" + tw[i].id)) 307 312 continue; 308 313 if (tw[i].user) { … … 327 332 pNode.style.minHeight = 0; 328 333 } 329 twNode.insertBefore(pNode, twNode.childNodes[0]); 334 if (after) 335 twNode.appendChild(pNode); 336 else 337 twNode.insertBefore(pNode, twNode.childNodes[0]); 330 338 if (animation2) 331 339 animate(pNode, maxH, (new Date).getTime()); 332 340 else if (animation) { 333 341 $('rep').style.top = (rep_top += pNode.clientHeight); 334 scrollBy(0, pNode.clientHeight );342 scrollBy(0, pNode.clientHeight+1); 335 343 } 336 344 if (animation) { … … 351 359 elem.style.maxHeight = Math.ceil(max*(1-Math.cos((t-start)/1000*Math.PI))/2); 352 360 setTimeout(animate, 50, elem, max, start); 361 } 362 // 次ページ取得 363 function getNext(ele) { 364 var tmp = document.createElement("div"); 365 tmp.id = "tmp"; 366 tmp.innerHTML = "<p></p>"; 367 ele.parentNode.appendChild(tmp); 368 ele.parentNode.removeChild(ele); 369 $("loading").style.display = "block"; 370 if (selected_menu.id == "user") 371 update_ele2 = loadXDomainScript('http://twitter.com/statuses/user_timeline.json?seq=' + (seq++) + 372 '&page=' + (++cur_page) + '&id=' + last_user + '&callback=twShow2', update_ele2); 373 else if (selected_menu.id == "reply") 374 update_ele2 = loadXDomainScript('http://twitter.com/statuses/replies.json?seq=' + (seq++) + 375 '&page=' + (++cur_page) + '&callback=twShow2', update_ele2); 353 376 } 354 377 // タイムライン切り替え … … 363 386 $("rep").style.display = "none"; 364 387 scrollTo(0, 1); 388 cur_page = 1; 365 389 } 366 390 function switchTL() {
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)