wogikaze
[aaa(ab)]
expand-linkって入れてなかったっけ...
style.css@import "../左側にリンクを表示するUserCSS/style.css";
style.css/* ポップアップメニューの修飾ボタンをアイコン化 */
.popup-menu .button-container .button.strong-button > strong,
.popup-menu .button-container .button.italic-button > i,
.popup-menu .button-container .button.strike-button > strike {
display: inline-block; width: 0; text-indent: -9999px }
.popup-menu .button-container .button.link-button::after,
.popup-menu .button-container .button.strong-button::after,
.popup-menu .button-container .button.italic-button::after,
.popup-menu .button-container .button.strike-button::after {
font: 900 100%/normal 'Font Awesome 5 Free';
display: inline-block; min-width: 16px; text-align: center }
.popup-menu .button-container .button.strong-button::after { content: '\f032' }
.popup-menu .button-container .button.italic-button::after { content: '\f033' }
.popup-menu .button-container .button.strike-button::after { content: '\f0cc' }
/* ポップアップメニューのボタン周りの線を消す */
.selections .popup-menu .button-container .button:not(:first-of-type) { border: 0 }
script.jsimport "/api/code/yuyasurarin/wogikaze/出張用.js";
scrapbox.PopupMenu.addButton({
title: text => /https?:\/\/\S+\.svg\s*/.test(text) ? 'SVG' : '',
onClick: text => {
if (!/https?:\/\/\S+\.svg\s*/.test(text)) return; // SVG URLがなければ何もしない
// コードブロック記法の変換
//let result = text.replace(/https:\/\/scrapbox.io\/api\/code\/([^\/]+)\/([^\/]+)\/(\S+)/g,
// 'https://svg-hosting.vercel.app/scrapbox.io/$1/$2/$3');
return text.replace(/(https?:\/\/\S+\.svg)\s*/g,`[https://svg-hosting.vercel.app/api/svg?url=$1]`);
},
});
scrapbox.PopupMenu.addButton({
title: '📘',
onClick: text => text.split('\n').map(line => `[>~ ${line}]`).join('\n')
})
scrapbox.PopupMenu.addButton({
title: '🐺',
onClick: text => text.split('\n').map(line => `[>' ${line}]`).join('\n')
})
scrapbox.PopupMenu.addButton({
title: '📕',
onClick: text => text.split('\n').map(line => `[>! ${line}]`).join('\n')
})
scrapbox.PopupMenu.addButton({
title: '📗',
onClick: text => text.split('\n').map(line => `[># ${line}]`).join('\n')
})
scrapbox.PopupMenu.addButton({
title: '🟥',
onClick: text => text.split('\n').map(line => `[>% ${line}]`).join('\n')
})
scrapbox.PopupMenu.addButton({
title: '🟦',
onClick: text => text.split('\n').map(line => `[>& ${line}]`).join('\n')
})
