- Timestamp:
- 09/27/08 16:27:58 (2 months ago)
- Location:
- websites/twicli
- Files:
-
- 3 modified
-
block_bg.png (modified) (previous)
-
favotter.js (modified) (3 diffs)
-
twicli.html (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
websites/twicli/favotter.js
r19685 r20041 6 6 if (this.cnt++ < 5) return; 7 7 this.cnt = 0; 8 this.fav_update = loadXDomainScript(' nr_favs.js?seq='+(seq++), this.fav_update);8 this.fav_update = loadXDomainScript('http://www.geocities.jp/twicli/nr_favs.js?seq='+(seq++), this.fav_update); 9 9 }, 10 10 newMessageElement: function(ele, tw) { … … 15 15 if (this.favs[tw.id]) { 16 16 fele.style.fontSize = "small"; 17 fele.style. color = "#092";17 fele.style.backgroundColor = "#3fc"; 18 18 fele.innerHTML = '[fav:' + this.favs[tw.id] + '] '; 19 19 } 20 20 ele.insertBefore(fele, ele.childNodes[4]); 21 21 }, 22 popup: function(ele, user, id) { 23 $('favotter_link_user').href = 'http://favotter.matope.com/user.php?user=' + user; 24 $('favotter_link_status').href = 'http://favotter.matope.com/status.php?id=' + id; 25 $('favotter_link_fav').href = 'http://favotter.matope.com/user.php?mode=fav&user=' + user; 26 } 22 27 }; 23 28 registerPlugin(twFavPlugin); … … 31 36 } 32 37 } 38 39 // Popup menu 40 41 var a = document.createElement("hr"); 42 $('popup').appendChild(a) 43 44 a = document.createElement("a"); 45 a.target = 'twitter'; 46 a.id = 'favotter_link_user'; 47 a.innerHTML = 'ふぁぼったー / ふぁぼられ'; 48 $('popup').appendChild(a) 49 50 a = document.createElement("a"); 51 a.target = 'twitter'; 52 a.id = 'favotter_link_status'; 53 a.innerHTML = 'ふぁぼったー / 発言'; 54 $('popup').appendChild(a) 55 56 a = document.createElement("a"); 57 a.target = 'twitter'; 58 a.id = 'favotter_link_fav'; 59 a.innerHTML = 'ふぁぼったー / ふぁぼり'; 60 $('popup').appendChild(a) 61 62 -
websites/twicli/twicli.html
r19732 r20041 12 12 13 13 #control { position: fixed; top: 0; left: 0; width: 100%; height: 52px; border-bottom: solid 1px black; background-color: white; z-index: 3; background-color: #eee; } 14 #loading { opacity: 0.5; position: absolute; top: 6px; width: 100%; height: 20px; z-index: 3; text-align: center; }14 #loading { opacity: 0.5; position: absolute; top: 6px; width: 100%; height: 20px; z-index: 4; text-align: center; } 15 15 #fst { position: absolute; left: 1px; top: 1px; width: 94%; height: 30px; font-size: small; } 16 16 #go { text-decoration: none; position: absolute; left: 95%; top: 1px; } … … 26 26 .dir { color: #679; } 27 27 .status { text-decoration: none; color: black; } 28 .utils { white-space: nowrap; text-align: right } 28 29 .prop, .prop a { color: #999; font-size: x-small; } 29 30 .fromme { background-color: #cfc; } … … 31 32 .button { color: #f29; border: solid 1px #ddd; text-decoration: none; font-size: medium; } 32 33 .green { color: #195; } 34 .popup { padding: 0 4px; color: #888; } 33 35 .lock { position: relative; top: 2px; left: 0; } 34 36 .close { color: red; } 35 37 #next { text-align: center; background-color: #999; color: #fec; cursor: pointer; } 36 38 #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; } 39 #popup { display: none; background-color: #eee; position: absolute; left: 0; top: 200px; border: #666 2px solid; z-index: 6; font-size: small; } 40 #popup a { display: block; background-color: #fff; color: black; text-decoration: none; padding: 3px; border-bottom: solid 1px #888; } 41 #popup a:hover { background-color: #33f; color: #fff; text-decoration: none; } 42 #popup a.row2 { background-color: #eee; } 43 #popup_hide { display: none; position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.1; background-color: black; z-index: 5; } 37 44 #user_info { margin: 1px; border: solid 1px #888; } 38 45 #user_info td { font-size: small; } … … 190 197 </div> 191 198 </div> 192 <!-- タイムライン-->199 <!--メインタイムライン--> 193 200 <div id="tw"></div> 201 <!--TL以外のタブ--> 194 202 <div id="tw2"><div id="tw2h"></div><div id="tw2c"></div></div> 203 <!--返信--> 195 204 <div id="rep"><a href="javascript:closeRep()" class="close">[x]</a> 196 205 <a href="javascript:pickup2()" class="close">[⇔]</a><div id="reps"></div></div> 197 <!----> 206 <!--ポップアップメニュー--> 207 <div id="popup" onClick="popup_hide()"> 208 <a id="popup_link_user" href="" target="twitter">Twitter / User</a> 209 <a id="popup_link_status" href="" target="twitter">Twitter / Status</a> 210 </div> 211 <!--ポップアップメニュー非表示用--> 212 <div id="popup_hide" onClick="popup_hide();"></div> 198 213 199 214 <script type="text/javascript"> … … 219 234 var user_pick1 = null; 220 235 var user_pick2 = null; 236 var user_popup = null; 221 237 var cur_page = 1; 222 238 var fav_mode = 0; 223 239 var reply_ele = false; 224 240 var rep_top = 0; 241 var popup_top = 0; 225 242 var selected_menu = $("TL"); 226 243 var failover_timeout = false; … … 306 323 switchUser(user_pick1 + "," + user_pick2); 307 324 } 325 // ポップアップメニューを表示 326 function popup(user, id, ele) { 327 user_popup = user; 328 callPlugins("popup", $('popup'), user, id); 329 $('popup_link_user').href = 'http://twitter.com/' + user; 330 $('popup_link_status').href = 'http://twitter.com/' + user + '/statuses/' + id; 331 $('popup').style.display = "block"; 332 var pos = cumulativeOffset(ele); 333 $('popup').style.left = pos[0] < $('popup').offsetWidth - ele.offsetWidth ? 0 : pos[0] - $('popup').offsetWidth + ele.offsetWidth; 334 $('popup').style.top = popup_top = pos[1] + 20; 335 $('popup_hide').style.height = document.body.scrollHeight; 336 $('popup_hide').style.display = "block"; 337 } 338 // ポップアップメニューを非表示 339 function popup_hide() { 340 $('popup').style.display = 'none'; 341 $('popup_hide').style.display = 'none' 342 } 308 343 // 最新タイムラインを取得 309 344 update = function() { … … 324 359 //ユーザアイコン 325 360 (tw.user.url ? '<a target="twitter" href="'+tw.user.url+'">' : '') + 326 '<img align="left" width=" 24" height="24" src="' + tw.user.profile_image_url + '">' + (tw.user.url ? '</a>' : '') +361 '<img align="left" width="32" height="32" src="' + tw.user.profile_image_url + '">' + (tw.user.url ? '</a>' : '') + 327 362 //名前 328 363 "<a href=\"http://twitter.com/" + un + "\" "+ "onClick=\"switchUser('" + un + "');return false\">" + un + … … 336 371 .replace(/@([\w-]+)/g, "<a href=\"http://twitter.com/$1\" onClick=\"switchUser('$1'); return false;\" >$&</a>").replace(/\r?\n|\r/g, "<br>") + '</span>' + 337 372 //日付'クライアント 338 ' <span class=" prop">' + dateFmt(new Date(tw.created_at)) + ' / ' + tw.source + '</span>' +373 ' <span class="utils"><span class="prop">' + dateFmt(new Date(tw.created_at)) + ' / ' + tw.source + '</span>' + 339 374 //返信先を設定 340 375 ' <a class="button green" href="javascript:replyTo(\'' + un + "'," + tw.id + ')">↩</a>' + 341 376 //返信元へのリンク 342 377 (tw.in_reply_to_status_id ? ' <a class="button" href="#" onClick="dispReply(\'' + un + '\',' + tw.in_reply_to_status_id + ',this); return false;">☞</a>' : '') + 343 '<br clear="left">'; 378 //popupメニュー表示 379 ' <a class="button popup" href="#" onClick="popup(\'' + un + "'," + tw.id + ', this); return false;"><small><small>▼</small></small></a>' + 380 '</span><br clear="left">'; 344 381 } 345 382 // ユーザ情報のHTML表現を生成 … … 491 528 else if (animation) { 492 529 $('rep').style.top = (rep_top += pNode.clientHeight+1); 530 $('popup').style.top = (popup_top += pNode.clientHeight+1); 493 531 scrollBy(0, pNode.clientHeight+1); 494 532 } … … 655 693 if (window.addEventListener) window.addEventListener('DOMMouseScroll', wheel, false); 656 694 window.onmousewheel = document.onmousewheel = wheel; 657 loadXDomainScript('http://twitter.com/statuses/user_timeline.json?count=1&callback=twUser &seq=' + (seq++));695 loadXDomainScript('http://twitter.com/statuses/user_timeline.json?count=1&callback=twUser'); 658 696 </script> 659 697 </body>
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)