UserScript:Scaffolding-02
Level 2 辞書に載っていそうなこと
code:scriptjs
const l2links = text => {
const regexp = /^[a-zA-Z0-9!-/:-@\-`{-~\s*$/gm if (regexp.test(text)) {
return wikipedia [https://en.wikipedia.org/w/index.php?search=${encodeURIComponent(text)} ${text}]\n
+ weblio [https://ejje.weblio.jp/content/${encodeURIComponent(text)} ${text}]\n
+ kotobank [https://kotobank.jp/gs/?q=${encodeURIComponent(text)} ${text}]\n
+ jisho [https://jisho.org/search/${encodeURIComponent(text)} ${text}]
} else {
return wikipedia [https://ja.wikipedia.org/w/index.php?search=${encodeURIComponent(text)} ${text}]\n
+ weblio [https://www.weblio.jp/content/${encodeURIComponent(text)} ${text}]\n
+ kotobank [https://kotobank.jp/gs/?q=${encodeURIComponent(text)} ${text}]\n
+ jisho [https://jisho.org/search/${encodeURIComponent(text)} ${text}]
}
}
scrapbox.PopupMenu.addButton({
title: 'L2',
onClick: l2links
})
UserScript.icon
https://img.shields.io/badge/JavaScript-UserScript_Scaffolding--02-F7DF1E.svg?logo=javascript&style=for-the-badge