JavaScript

引用ブックマークレット

引用〔古い引用:完全オリジナル〕ブックマークレット

javascript:var page_title=document.getElementsByTagName('title')[0].innerText.replace(/(^\s+)|(\s+$)|\n|\r/g,"").replace(/\s\s/g," ");var selection=document.getSelection() + "";void(prompt('URL','<p><fieldset><dl class="quote"><dd><blockquote cite=\"' + location.href + '\" title=\"'+ page_title +'\"><p>' + selection.replace(/\n/g, "<br />") + '</p></blockquote></dd><dt class="cite">%E5%BC%95%E7%94%A8%E5%85%83: <a href=\"' + location.href + '\" target=\"_blank\" rel=\"nofollow\">'+ page_title +'</a></dt></dl></fieldset></p>'));

引用〔古い引用〕ブックマークレット|URLエンコードを修正

javascript:var page_title=document.getElementsByTagName('title')[0].innerText.replace(/(^\s+)|(\s+$)|\n|\r/g,"").replace(/\s\s/g," ");var selection=document.getSelection() + "";void(prompt('URL','<p><fieldset><dl class="quote"><dd><blockquote cite=\"' + location.href + '\" title=\"'+ page_title +'\"><p>' + selection.replace(/\n/g, "<br />") + '</p></blockquote></dd><dt class="cite">引用元: <a href=\"' + location.href + '\" target=\"_blank\" rel=\"nofollow\">'+ page_title +'</a></dt></dl></fieldset></p>'));

用引〔新しい引用〕ブックマークレット|URLエンコードを修正

javascript:var page_title=document.getElementsByTagName('title')[0].innerText.replace(/(^\s+)|(\s+$)|\n|\r/g,"").replace(/\s\s/g," ");var escaped_title=page_title.replace(/"/g, "&quot;");var selection=document.getSelection() + "";void(prompt('URL','<p><fieldset><dl class="quote"><dd><blockquote cite="' + location.href + '" title="'+ escaped_title +'"><p>' + selection.replace(/\n/g, "<br />") + '</p></blockquote></dd><dt class="cite">引用元: <a href="' + location.href + '" target="_blank" rel="nofollow">'+ escaped_title +'</a></dt></dl></fieldset></p>'))

用引〔最も新しい引用〕ブックマークレット|クリップボードに自動読み込み

javascript:var page_title=document.getElementsByTagName('title')[0].innerText.replace(/(^\s+)|(\s+$)|\n|\r/g,"").replace(/\s\s/g," ");var escaped_title=page_title.replace(/"/g,"&quot;");var selection=(document.getSelection()+"").replace(/\n/g,"%E2%97%8F%E2%97%8F%E2%97%8F");var content=('<p><fieldset><dl class="quote"><dd><blockquote cite="'+location.href+'" title="'+escaped_title+'"><p>'+selection.replace(/%E2%97%8F%E2%97%8F%E2%97%8F/g,"<br />")+'</p></blockquote></dd><dt class="cite">%E5%BC%95%E7%94%A8%E5%85%83: <a href="'+location.href+'" target="_blank" rel="nofollow">'+escaped_title+'</a></dt></dl></fieldset></p>').replace(/\s+/g," ").replace(/ +<br \/>/g,"<br />");var textArea=document.createElement("textarea");textArea.value=content;document.body.appendChild(textArea);textArea.select();document.execCommand('copy');document.body.removeChild(textArea);void(prompt('',''))