ミルヒト
由来は「見る人」
ネットウォッチャー
そのままだとよくある単語
様子見中
Xが怪しい動きをしているからアカウントだけ作ったけど、今のところギリギリ生きているから放置中
UserScriptは基本拾いもの
ありがたく使わせてもらっている
日付表示形式
script.jsscrapbox.TimeStamp.removeAllFormats()
scrapbox.TimeStamp.addFormat("#YYYY-MM-DD")
インデント削除 (アウトライナーから)
script.js scrapbox.PopupMenu.addButton({
title: 'インデント削除',
onClick: text => {
text = text.split(/\n/).map(line => line.normalize().replace(/\s{4}/g,' ')).join('\n');
return text;
}
})
選択した文字列へ太字マーカー
script.js// 選択した文字列にマーカー
scrapbox.PopupMenu.addButton({
title: 'マーカー',
onClick: text => `[[${text}]]`
})
script.jsscrapbox.PageMenu.addMenu({
title: '末尾',
image: 'https://gyazo.com/c5899b2e522db2f5172f52b4fa1e3f48/raw',
onClick: () => {
$("html,body").animate({scrollTop:$('.related-page-sort-menu').offset().top});
}
})
script.jsscrapbox.PopupMenu.addButton({
title: 'escape',
onClick: (str) => (
// リンクを全角に
str.replace(/(\[|\])/g, function(match) {
return match === '[' ? '[' : ']';
})
// hashtagを全角に
.replace(/#/g, '#')
)
});
()
ではなく全角の []
にするようにカスタマイズ
リンク以外でも使い道があるので
script.js import { mount } from "../../miruyomukaku/ScrapBubble/mod.js";
if (!/mobile/i.test(navigator.userAgent)) {
mount();
}