javascript:google-reader-hateb-counter-for-chrome
差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン最新のリビジョン両方とも次のリビジョン | ||
javascript:google-reader-hateb-counter-for-chrome [2008/09/11 23:42] – dgbadmin | javascript:google-reader-hateb-counter-for-chrome [2009/11/30 00:28] – greasemonkey工具箱に移動した dgbadmin | ||
---|---|---|---|
行 1: | 行 1: | ||
- | ====== | + | ====== |
- | (コメントは[[http:// | + | [[javascript/ |
- | + | ||
- | Google製の高速ブラウザー「Chrome」でGoogle Readerを見たときに、各エントリーに はてなブックマークのブックマーク数を表示するユーザースクリプト。 | + | |
- | + | ||
- | 動作にはChrome版のGreaseMonkeyである[[http:// | + | |
- | (Greasemetalのインストール方法などは[[http:// | + | |
- | + | ||
- | ちなみに、FirefoxのGreaseMonkeyでは実行対象のページの定義(冒頭の「@include http: | + | |
- | + | ||
- | + | ||
- | ===== ライセンス ===== | + | |
- | [[http:// | + | |
- | + | ||
- | + | ||
- | ===== ダウンロード ===== | + | |
- | [[http:// | + | |
- | + | ||
- | + | ||
- | ===== ソースコード ===== | + | |
- | <code javascript> | + | |
- | // ==UserScript== | + | |
- | // @name Google Reader + ? Bookmark for Chrome | + | |
- | // @namespace | + | |
- | // @description | + | |
- | // @include | + | |
- | // @include | + | |
- | // @include | + | |
- | // @include | + | |
- | // ==/ | + | |
- | // license | + | |
- | + | ||
- | (function() { | + | |
- | var HATEB_URL = " | + | |
- | var feedTitle = ""; | + | |
- | var entries = null; | + | |
- | var i = 0; | + | |
- | + | ||
- | var addHateB = function() { | + | |
- | var currentTitleTag = document.getElementById(" | + | |
- | if (currentTitleTag.innerHTML != feedTitle) { | + | |
- | feedTitle = currentTitleTag.innerHTML; | + | |
- | entries = document.getElementById(" | + | |
- | i = 0; | + | |
- | } | + | |
- | if (!entries[i].className.match(/ | + | |
- | return; | + | |
- | } | + | |
- | var entryMainTag = entries[i].firstChild.lastChild; | + | |
- | var url = entryMainTag.firstChild.href; | + | |
- | var hateb = ' <a href="' | + | |
- | hateb += '< | + | |
- | entryMainTag.lastChild.firstChild.innerHTML += hateb; | + | |
- | i++; | + | |
- | }; | + | |
- | + | ||
- | setInterval(addHateB, | + | |
- | })(); | + | |
- | </ | + | |
javascript/google-reader-hateb-counter-for-chrome.txt · 最終更新: 2009/11/30 00:28 by dgbadmin