Twitter add RT button ver.1.2 新UI向け仮パッチ つくってみたよ
- elderalliance
- 1608
- 0
- 0
- 0
動作が非常に中途半端だが、Twitter add RT buttonの新UI用向けパッチができた。
2010-10-10 22:50:51l25 document.body.id -> document.querySelectorAll('.screen-name')[0] ...ここは自信ない。
2010-10-10 22:53:14l42 entry.querySelector('.entry-date') -> entry.querySelector('.tweet-timestamp')
2010-10-10 22:53:51l44 content.href.replace(/^https/, 'http') -> content.href ... これは好き好きかも。
2010-10-10 22:55:36l.111 からのsetStatus 関数内: return open('/home?status=' + encodeURIComponent(text)); 以外の行全部削除。 別ウィンドウが開くどうしようもない仕様だが、あくまで緊急用のパッチということで。
2010-10-10 22:57:37l.147 entry.querySelector('.actions-hover') -> entry.querySelector('.tweet-actions')
2010-10-10 22:58:24l154 document.createElement('li') -> document.createElement('a')
2010-10-10 23:00:25l155~ li.innerHTML =(略) -> li.innerHTML = '<span><i></i><b>引用</b></span>';
2010-10-10 23:01:31l.173 document.querySelectorAll('.hentry') -> document.querySelectorAll('.stream-item')
2010-10-10 23:04:01l.182 (/hentry/).test(elem.className) -> (/stream-item/).test(elem.className)
2010-10-10 23:04:29修正は以上。あくまで、本家から正式版をリリースいただけるまでの緊急パッチであって、正しい動作をしているとはとうてい思えないのでご留意のこと。
2010-10-10 23:06:07Twitter add RT button for new UI http://bit.ly/9CTSRT i made this beta version.
2010-10-13 23:41:26試しに使ってみる。 RT @mitukiii: Twitter add RT button for new UI http://bit.ly/9CTSRT i made this beta version.
2010-10-13 23:48:23@elderalliance and, can not use by google chrome perhaps
2010-10-13 23:52:32@elderalliance 再度。多分パーマリンクのページ以外は動きます。後、イベントを自前で生成してるんですが、Firefoxの仕様を元に作ったので、おそらくChromeでは動きません。
2010-10-13 23:59:23hack完了。 l43を、content = element.querySelector('.tweet-timestamp').href とした。 RT @mitukiii: https://twitter.com/#!/mitukiii/status/27249109819
2010-10-14 00:03:35再掲。Twitter add RT buttonの新UI対応版のベータ作成しました。ヒトバシラーな方はどうぞ。 http://bit.ly/9CTSRT
2010-10-14 00:01:00