scriptxx.jsconst l1links = text => {
const regexp = /^[a-zA-Z0-9!-/:-@\[-`{-~\s]*$/gm
if (regexp.test(text)) {
return `[https://ejje.weblio.jp/content/${text}]\n`
+ `[https://www.ldoceonline.com/dictionary/${text}]\n`
+ `[https://www.dictionary.com/browse/${text}]\n`
+ `[https://www.thesaurus.com/browse/${text}]\n`
+ `[https://jisho.org/search/${text}]\n`
} else {
return `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}]\n`
}
}
scrapbox.PopupMenu.addButton({
title: 'L1',
onClick: l1links
})
scriptxx.jsconst 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
})
scriptxx.jsconst l3links = text => {
const regexp = /^[a-zA-Z0-9!-/:-@\[-`{-~\s]*$/gm
if (regexp.test(text)) {
return `[google.icon][https://www.google.com/search?q=${encodeURI(text.replace(' ', '+'))} ${text}]\n`
+ `image [https://www.google.com/search?q=${encodeURI(text.replace(' ', '+'))}&tbm=isch ${text}]\n`
+ `define [https://www.google.com/search?q=${encodeURI(text.replace(' ', '+'))}+define ${text}]`
} else {
return `[google.icon][https://www.google.com/search?q=${encodeURI(text.replace(' ', '+'))} ${text}]\n`
+ `画像 [https://www.google.com/search?q=${encodeURI(text.replace(' ', '+'))}&tbm=isch ${text}]\n`
+ `定義 [https://www.google.com/search?q=${encodeURI(text.replace(' ', '+')+'+定義')} ${text}]`
}
}
scrapbox.PopupMenu.addButton({
title: 'L3',
onClick: l3links
})
scriptxx.jsconst l4links = text => {
return `[/icons/google.icon][https://www.google.com/search?q=${encodeURI(text.replace(' ', '+'))}&tbm=isch ${text}]\n`
+ `[/icons/pinterest.icon][https://www.pinterest.jp/search/pins/?q=${encodeURI(text.replace(' ', '+'))} ${text}]`
}
scrapbox.PopupMenu.addButton({
title: 'L4',
onClick: l4links
})
scriptxx.jsconst l5links = text => {
const regexp = /^[a-zA-Z0-9!-/:-@\[-`{-~\s]*$/gm
if (regexp.test(text)) {
return `[/icons/wikipedia.icon][https://en.wikipedia.org/w/index.php?search=${encodeURIComponent(text)} ${text}]\n`
+ `[/icons/google.icon][https://www.google.com/search?q=${encodeURI(text.replace(' ', '+'))} ${text}]\n`
+ `[/icons/twitter.icon][https://twitter.com/search?q=${encodeURI(text.replace(' ', '+'))} ${text}]\n`
+ `Urban Dictionary [https://www.urbandictionary.com/define.php?term=${encodeURI(text.replace(' ', '+'))} ${text}]`
} else {
return `[/icons/wikipedia.icon][https://ja.wikipedia.org/w/index.php?search=${encodeURIComponent(text)} ${text}]\n`
+ `[/icons/google.icon][https://www.google.com/search?q=${encodeURI(text.replace(' ', '+'))} ${text}]\n`
+ `[/icons/twitter.icon][https://twitter.com/search?q=${encodeURI(text.replace(' ', '+'))} ${text}]`
}
}
scrapbox.PopupMenu.addButton({
title: 'L5',
onClick: l5links
})
scriptxx.jsconst l6links = text => {
return `[/icons/qiita.icon][https://qiita.com/search?q=${encodeURI(text.replace(' ', '+'))} ${text}]\n`
+ `[/icons/github.icon][https://github.com/search?q=${encodeURI(text.replace(' ', '+'))} ${text}]`
}
scrapbox.PopupMenu.addButton({
title: 'L6',
onClick: l6links
})
script.jsconst x1links = text => {
const regexp = /^[a-zA-Z0-9!-/:-@\[-`{-~\s]*$/gm
if (regexp.test(text)) {
return `[/suto3/google.icon][https://www.google.com/search?q=${encodeURI(text.replace(' ', '+'))} ${text}]\n`
+ `[/suto3/Google画像検索.icon][https://www.google.com/search?q=${encodeURI(text.replace(' ', '+'))}&tbm=isch ${text}]\n`
+ `[/suto3/Google定義検索.icon] [https://www.google.com/search?q=${encodeURI(text.replace(' ', '+'))}+define ${text}]\n`
+ `[/suto3/wikipedia.icon][https://en.wikipedia.org/w/index.php?search=${encodeURIComponent(text)} ${text}]\n`
+ `[/suto3/weblio.icon] [https://ejje.weblio.jp/content/${encodeURIComponent(text)} ${text}]\n`
+ `[/suto3/kotobank.icon] [https://kotobank.jp/gs/?q=${encodeURIComponent(text)} ${text}]\n`
+ `[/suto3/jisho.icon] [https://jisho.org/search/${encodeURIComponent(text)} ${text}]`
} else {
return `[/suto3/google.icon][https://www.google.com/search?q=${encodeURI(text.replace(' ', '+'))} ${text}]\n`
+ `画像 [https://www.google.com/search?q=${encodeURI(text.replace(' ', '+'))}&tbm=isch ${text}]\n`
+ `定義 [https://www.google.com/search?q=${encodeURI(text.replace(' ', '+')+'+定義')} ${text}]\n`
+ `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: '🪜',
//title: text => {return('✳' + text)},
onClick: x1links
})