BugbearR
https://lh3.googleusercontent.com/a-/AOh14GirPKK2wUTL31nGct-v50hORgt-WOMMAzlTnnm6ekU=s96-c#.png
this is BugbearR’s page
code:style.css
/* html.myscript-hello body { */
/* background-color: green; */
/* } */
html.myscript-hello .section-title { counter-reset: codeline }
html.myscript-hello .code-block-start { counter-reset: codeline }
html.myscript-hello .code-block code > span:not(class) { counter-increment: codeline } html.myscript-hello .code-block code > span:not(class)::before { content: counter(codeline);
position: absolute; display: inline-block; left: -4em; z-index: 10;
min-width: 50px; text-align: right; vertical-align: bottom;
/* ↓行番号のフォントとか色とかの指定はここ */
font-family: monospace; color: grey
}
/* カーソル行の行番号を濃く表示する */
html.myscript-hello .code-block code > span:not(class)::before { opacity: .5 } html.myscript-hello .cursor-line .code-block code > span:not(class)::before { opacity: 1; font-weight: bolder } } code:script.js
scrapbox.PageMenu.addMenu({
title: 'NewButton',
/* onClick: () => alert('Hello, Scrapbox!'), */
});
scrapbox.PageMenu('NewButton').addItem({
title: 'AddClassHello',
onClick: () => {
document.documentElement.classList.add('myscript-hello');
}
});
scrapbox.PageMenu('NewButton').addItem({
title: 'RemoveClassHello',
onClick: () => {
document.documentElement.classList.remove('myscript-hello');
}
});