タグ付けまで出来るブックマークレット
デフォルトのブックマークレットにタグ付け機能を足しました。
例えばexample.comでこれを使うと、
入力欄には Example Domain が最初から入力されていますが、
ここを、Example Domain,#hoge,#huga というふうにすると、
出来上がったscrapにはhogeタグとhugaタグが挿入されるのです。
code:bookmarklet
javascript:(
function(){
var pre_title=window.prompt('scrap',document.title);
var arr_title = pre_title.split(",");
if (!pre_title) return;
arr_title.some(function(element,index,array){if(index!=0)lines=lines.concat(element);});
var quote=window.getSelection().toString();
if (quote.trim())
lines=lines.concat(quote.split(/\n/g).map(function(line){return ' >'+line}));
lines.push('');
var body=encodeURIComponent(lines.join('\n'));