/*
* @title pixivの検索結果にはてブ
* @description なんかスクロールバーがたまに無意味(←うるさい)
* @include htt*://www.pixiv.net*
* @license MIT License
* @require
*/
(function(){
i = 0;
if ((location.protocol == 'http:')
&& (location.hostname == 'www.pixiv.net')
&& (location.pathname == '/search.php')) {
while (document.querySelectorAll('li.image-item ul').length > i) {
if (!document.querySelectorAll('li.image-item')[i]
.querySelector('ul.count-list')) {
document.querySelectorAll('li.image-item')[i].innerHTML += '<ul class="count-list">';
}
document.querySelectorAll('li.image-item ul')[i].innerHTML += '<a href="http://b.hatena.ne.jp/add?mode=confirm&url='
+ escape(location.protocol
+ '//'
+ location.hostname
+ document.querySelectorAll('li.image-item a.work')[i].attributes['href'].value)
// + '" class="hatena-bookmark-button"
// data-hatena-bookmark-title="'
// + document.querySelectorAll('li.image-item
// h1.title')[i].attributes['title'].value
+ '" data-hatena-bookmark-layout="standard" title="このエントリーをはてなブックマークに追加"><img src="http://b.st-hatena.com/images/entry-button/button-only.gif" alt="このエントリーをはてなブックマークに追加" width="20" height="20" style="border: none;" /></a>';
i += 1;
}
}
})();