settings4work4ai
なんでも真似しちゃう
CSSs
code:style.css
JS
code:script.js
// import "/api/code/work4ai/png画像からデータを読み取るscript/mod.js";
code:script.jss
scrapbox.PopupMenu.addButton({
title: 'code',
onClick: text => "[${text}]"
})
code:script.js
// /(?=(?=nico\.ms|nicovideo\.jp\/(?=watch|seiga|)\/)|)?(a-z{2}?1-90-9*)/ const niconicoRegex = /https:\/\/www.nicovideo.jp\/watch\/(a-z{2}\d+)/ scrapbox.PopupMenu.addButton({
title: text => niconicoRegex.test(text) ? "ニコニコ" : null, // id情報を切る
onClick: (text) => {
const m = text.match(niconicoRegex);
if (!m) return text;
return [https://nicothumb2img.vercel.app/image/${m[1]}#.png https://nico.ms/${m[1]}];
},
});