Skip to content

Instantly share code, notes, and snippets.

@kyanny
Created June 12, 2009 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kyanny/128740 to your computer and use it in GitHub Desktop.
Save kyanny/128740 to your computer and use it in GitHub Desktop.
<script src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
if (location.href.match(/^http:\/\/.*?\/archives\/\d+\.html$/)) {
google.load('jquery', '1');
google.setOnLoadCallback(function(){
$('<a>').attr({
href : 'http://b.hatena.ne.jp/entry/' + location.href
}).append(
$('<img>').attr({
src : 'http://d.hatena.ne.jp/images/b_entry.gif',
width : 16,
height : 12,
style : 'border: none;',
alt : 'このエントリーを含むはてなブックマーク',
title : 'このエントリーを含むはてなブックマーク'
}).get()
).append(
$('<img>').attr({
src : 'http://b.hatena.ne.jp/entry/image/' + location.href,
style : 'border: none;',
alt : 'はてなブックマーク - ' + document.title,
title : 'はてなブックマーク -' + document.title
}).get()
).appendTo('.article-title.entry-title');
});
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment