/*
* @title Get Hatena.Bookmark.entry.eid v2
* @description make eid notation
* @include https://b.hatena.ne.jp/entry*
* @license MIT License
* @javascript_url
*/
((d)=>{
if(!d.documentElement.hasAttribute('data-entry-eid')) return;
const Header = d.getElementById('info-header');
const EID = d.documentElement.dataset.entryEid;
const data = "id:entry:" + EID;
const _HTML = `
<div id="ir_ki9nsgMAA" style="z-index:2147483647; position:absolute; top:40%; left:40%; padding:5px; background:#aaa">
<input type="text" value=${data} />
<p><button type="button" onclick="close_elm('ir_ki9nsgMAA')">閉じる</button></p>
</div>
`;
if(Header.lastChild) {
Header.lastChild.innerHTML=_HTML;
} else {
alert ('画面を再読み込みしてやり直してください');
return;
}
close_elm = function(i) {
const target = d.getElementById(i);
return target.remove();
};
})(document);