Written by Anonymous
javascript:(function(){var host=location.host;if(host=='www.amazon.co.jp'){var titleElems=[document.getElementById('productTitle'),document.getElementById('ebooksProductTitle'),document.getElementById('aiv-content-title'),document.getElementById('title_feature_div')];var title=titleElems.filter(v=>{return v!=null})[0].innerText.trim().replace(/[\[|\]]/g,'');var matched=location.href.match(/(?:dp|o|gp|-|ASIN|product)\/(B[0-9]{2}[0-9A-Z]{7}|[0-9]{9}(?:X|[0-9]))/);var asin=matched!=null?matched[1]:'';var shortcode='[amazon asin="'+asin+'" kw="'+title+'" rakuten=0 yahoo=0]'}else{alert('Error:ブックマークレットのサポート範囲外のページです。')}if(shortcode){if(asin){if(shortcode=prompt('コピーしてください。',shortcode)){var r=document.createRange();var text=document.createTextNode(shortcode);r.selectNode(document.body.appendChild(text));window.getSelection().addRange(r);document.execCommand('copy');text.remove()}}else alert('Error:コードが見つかりませんでした。')}})();void(0);