内部リンク型マーカー記法
author: Nrem.icon
https://gyazo.com/ceff4755f42b1fdfe8285ad92ec0bd3c
UserCSS.icon UserScript.icon
書式:[# [<color-name>]テキスト]
例:
2026-04-04 リファクタリング&パフォーマンスの改善
セレクターを変更した。この版からは同じリンク名を2カ所に記述する必要がある
code:style.css
.line:not(.cursor-line) .deco-\# {
background-color: hsl(from deepskyblue h s l / 35%);
}
background-color: hsl(from darkorange h s l / 35%);
}
background-color: hsl(from gold h s l / 35%);
}
background-color: hsl(from lime h s l / 35%);
}
background-color: hsl(from crimson h s l / 35%);
}
background-color: hsl(from darkmagenta h s l / 35%);
}
}
code:script.js
scrapbox.PopupMenu.addButton({
title: '🟦',
onClick: text => text.split('\n').map(line => [# [blue]${line}]).join('\n')
})
scrapbox.PopupMenu.addButton({
title: '🟧',
onClick: text => text.split('\n').map(line => [# [orange]${line}]).join('\n')
})
scrapbox.PopupMenu.addButton({
title: '🟨',
onClick: text => text.split('\n').map(line => [# [yellow]${line}]).join('\n')
})
scrapbox.PopupMenu.addButton({
title: '🟩',
onClick: text => text.split('\n').map(line => [# [green]${line}]).join('\n')
})
scrapbox.PopupMenu.addButton({
title: '🟥',
onClick: text => text.split('\n').map(line => [# [red]${line}]).join('\n')
})
scrapbox.PopupMenu.addButton({
title: '🟪',
onClick: text => text.split('\n').map(line => [# [purple]${line}]).join('\n')
})