owqi_0691
code:style.css
/* 二重括弧による強調をマーカーっぽくする */
.line strong:not(class) { background: linear-gradient(transparent 30%, #A8FCFF 10%, #A8FCFF 70%, transparent 90%) }
code:script.js
//文字数カウント
scrapbox.PageMenu.addItem({
title: () => {
if (!scrapbox.Page.lines) return
const chars = scrapbox.Page.lines.map(line => line.text.length).reduce((a,b) => a + b)
const words = scrapbox.Page.lines.map(line => line.text.split(/\s+/).length).reduce((a,b) => a + b)
return ${chars}文字 ${words}単語 ${scrapbox.Page.lines.length}行
},
onClick: () => null
})