textwell-bookmarklet
参照中ページのタイトル、URLと選択されているテキストをTextwellへ追記するブックマークレット
code:script.js
javascript: (function () {
// URLとタイトルを取得しMarkdown形式のリンクを生成
function urlTitle() {
var text = "+ document.title + "(" + document.URL + ")";
var s = window.getSelection();
if (s.toString().length > 0 ) {
text = text + '\n' + s;
}
return text;
}
const content = "\n" + urlTitle() + "\n";
document.location.href = "textwell:///add?"
+ "&text=" + encodeURIComponent(content);
})();