内部リンク型マーカー記法
author: Nrem.icon
旧ページ名:マーカー記法
https://gyazo.com/ceff4755f42b1fdfe8285ad92ec0bd3c
UserCSS.icon UserScript.icon
指定範囲内のテキストの背景色を変更する文字装飾記法。
同じ色のマーカーのあるページが関連ページリストに表示される。
/scrasobox/マーカーとは異なる実装。
行頭記号付きマーカー記法
書式:[# [<color-name>]テキスト]
例:
blueテキスト
yellowテキスト
orangeテキスト
greenテキスト
redテキスト
purpleテキスト
2026-04-04 リファクタリング&パフォーマンスの改善
セレクターを変更した。この版からは同じリンク名を2カ所に記述する必要がある
#UserCSS
from /nrem-configs/内部リンク型マーカー記法
code:style.css
.line:not(.cursor-line) .deco-\# {
& > span:not(.char-index):nth-of-type(1) > a.page-linkdata-page-title="blue" { display: none; }
&:has(> span:not(.char-index):nth-of-type(1) > adata-page-title="blue") {
background-color: hsl(from deepskyblue h s l / 35%);
}
& > span:not(.char-index):nth-of-type(1) > a.page-linkdata-page-title="orange" { display: none; }
&:has(> span:not(.char-index):nth-of-type(1) > adata-page-title="orange") {
background-color: hsl(from darkorange h s l / 35%);
}
& > span:not(.char-index):nth-of-type(1) > a.page-linkdata-page-title="yellow" { display: none; }
&:has(> span:not(.char-index):nth-of-type(1) > adata-page-title="yellow") {
background-color: hsl(from gold h s l / 35%);
}
& > span:not(.char-index):nth-of-type(1) > a.page-linkdata-page-title="green" { display: none; }
&:has(> span:not(.char-index):nth-of-type(1) > adata-page-title="green") {
background-color: hsl(from lime h s l / 35%);
}
& > span:not(.char-index):nth-of-type(1) > a.page-linkdata-page-title="red" { display: none; }
&:has(> span:not(.char-index):nth-of-type(1) > adata-page-title="red") {
background-color: hsl(from crimson h s l / 35%);
}
& > span:not(.char-index):nth-of-type(1) > a.page-linkdata-page-title="purple" { display: none; }
&:has(> span:not(.char-index):nth-of-type(1) > adata-page-title="purple") {
background-color: hsl(from darkmagenta h s l / 35%);
}
}
Popup Menuにボタンを追加する #UserScript
from /forum-jp/文字色#5c41dd7abe9f3900007efa74
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')
})