twitterのTLにbit.lyのトラッキングページへのリンクを追加するGreasemonkey
♪このグリースモンキーが〜
ないとき〜
あるとき〜
551の蓬莱調でお届けしてみた訳ですが、このグリモンをインストールすると、bit.lyやj.mpの短縮urlのすぐ後ろに、その短縮urlのトラッキングページへのリンクをプラスします。
といった効果が臨めます。
bit.lyのトラッキングページの楽しみ方は、
短縮URLサービスbit.ly、j.mpのアカウントを取って自分の影響力を測る - Cherenkovの暗中模索にっき
をご覧下さい。
という訳で、よければどうぞ。
http://userscripts.org/scripts/show/68773
新しいツイートがxx件あります にも対応させました。
ソース
// ==UserScript== // @name addLink_bitlyInfo // @namespace http://d.hatena.ne.jp/so_blue/ // @author so_blue // @version 0.1 // @description bit.ly,j.mpのトラッキングページへのリンクをプラスします。 // @include http://twitter.com/* // @include https://twitter.com/* // ==/UserScript== (function(){ function addLink(doc) { var a = document.createElement('A') a.textContent = '+'; a.target = '_blank'; var xpath = './/span[@class="entry-content"]/a[contains(@href, "bit.ly") or contains(@href, "j.mp")]'; var bits = document.evaluate(xpath, doc, null, 7, null); for (var i = 0, len = bits.snapshotLength; i < len; i++) { var elm = a.cloneNode(true); elm.href = bits.snapshotItem(i).href + '+'; bits.snapshotItem(i).parentNode.insertBefore(elm, bits.snapshotItem(i).nextSibling); } //後始末? a = null; } /* AutoPagerize対応 via http://d.hatena.ne.jp/blooo/20091012/1255323254 */ document.body.addEventListener('AutoPagerize_DOMNodeInserted', function(evt) { var doc = evt.target; addLink(doc); }, false); addLink(document); })();