pixivの検索結果にはてブ
by
mafucode
2013-03-22 [2013/03/22 17:53:23]
なんかスクロールバーがたまに無意味(←うるさい)
/*
* @title bookmarklet
* @description my bookmarklet
* @include http://*
* @license MIT License
* @require
*/
document.querySelectorAll('li.image-item')[0].innerHTML+='<a href="'
+location.protocol+'//'+location.hostname+document.querySelectorAll('li.image-item a.work')[0].attributes['href'].value
+'" class="hatena-bookmark-button" data-hatena-bookmark-title="'
+document.querySelectorAll('li.image-item h1.title')[0].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><script type="text/javascript" src="http://b.st-hatena.com/js/bookmark_button.js" charset="utf-8" async="async"></script>'
- Permalink
- このページへの個別リンクです。
- RAW
- 書かれたコードへの直接のリンクです。
- Packed
- 文字列が圧縮された書かれたコードへのリンクです。
- Userscript
- Greasemonkey 等で利用する場合の .user.js へのリンクです。
- Loader
- @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
- Metadata
- コード中にコメントで @xxx と書かれたメタデータの JSON です。