FirefoxのMake Link extensionがうまく動作しないので、UbiquityでMake Linkできるようにスクリプトを書いてみました。takesはいらないけど、あとで修正するかもしれないのでそのまま置いときます。動作検証は不十分なので、バグがあったらコメントよろしくです。
Ubiquityでmake-linkやmake-quoteを実行すると、リンクを作成してクリップボードにコピーしてくれます。
CmdUtils.CreateCommand({ name: "make-link", takes: {"input": noun_arb_text}, preview: function( pblock, input ) { var doc = context.focusedWindow.document var selection = CmdUtils.getSelection(context); var text = null; if (selection) { text = selection; } else { text = doc.title; } var template = "<a href=\"${url}\">${text}</a>"; pblock.innerHTML = CmdUtils.renderTemplate(template, {"url": doc.URL, "text": text}); }, execute: function(input) { var doc = context.focusedWindow.document var selection = CmdUtils.getSelection(context); var text = null; if (selection) { text = selection; } else { text = doc.title; } var template = "${text}" var result = CmdUtils.renderTemplate(template, {"url": doc.URL, "text": text}); CmdUtils.copyToClipboard(result); } }); CmdUtils.CreateCommand({ takes: {"input": noun_arb_text}, preview: function( pblock, input ) { var doc = context.focusedWindow.document var selection = CmdUtils.getSelection(context); var template = "<blockquote cite=\"${url}\">
\n<p>${selection}</p>
[From <a href=\"${url}\"><cite>${title}</cite></a>]
</blockquote>"; pblock.innerHTML = CmdUtils.renderTemplate(template, {"url": doc.URL, "selection": selection, "title": doc.title}); }, execute: function(input) { var doc = context.focusedWindow.document var selection = CmdUtils.getSelection(context); var template = "\n"; var result = CmdUtils.renderTemplate(template, {"url": doc.URL, "selection": selection, "title": doc.title}); CmdUtils.copyToClipboard(result); } });${selection}
[From ${title}]