page-menu-search
code:script.js
// required
import '../page-menu-search/addMenu.js'
// optional
import '../page-menu-search/Scrapbox.js'
import '../page-menu-search/GoogleSearch.js'
import '../page-menu-search/oxford.js'
import '../page-menu-search/collins.js'
import '../page-menu-search/ndcnavi.js'
import '../page-menu-search/国立国会図書館.js'
//import '../page-menu-search/GoogleImages.js'
code:addMenu.js
scrapbox.PageMenu.addMenu({
title: 'search',
})
code:GoogleSearch.js
scrapbox.PageMenu('search').addItem({
title: 'Google',
onClick: () =>
window.open(https://www.google.co.jp/search?q=${encodeURIComponent(scrapbox.Page.title)}),
})
code:GoogleImages.js
scrapbox.PageMenu('search').addItem({
title: 'Google Images',
onClick: () =>
window.open(
https://www.google.co.jp/search?q=${scrapbox.Page.title}&tbm=isch
),
})
code:Scrapbox.js
scrapbox.PageMenu('search').addItem({
title: 'Scrapbox',
onClick: () =>
window.open(
https://scrapbox.io/${scrapbox.Project.name}/search/page?q="${scrapbox.Page.title}"
),
})
code:国立国会図書館.js
scrapbox.PageMenu('search').addItem({
title: '国立国会図書館',
onClick: () =>
window.open(https://ndlsearch.ndl.go.jp/search?cs=bib&display=panel&from=0&size=100&keyword=${scrapbox.Page.title}&f-ht=ndl&f-ht=library)
})
code:oxford.js
scrapbox.PageMenu('search').addItem({
title: "Oxford Learner's Dictionary",
onClick: () =>
window.open(
https://www.oxfordlearnersdictionaries.com/search/english/?q=${scrapbox.Page.title}
),
})
code:collins.js
scrapbox.PageMenu('search').addItem({
title: "Collins English Dictionary",
onClick: () =>
window.open(
https://www.collinsdictionary.com/search/?dictCode=english&q=${scrapbox.Page.title}
),
})
code:ndcnavi.js
scrapbox.PageMenu('search').addItem({
title: 'NDC Navi',
onClick: () =>
window.open(http://jasmine.media.osaka-cu.ac.jp/ndc_navi10/search/${scrapbox.Page.title}/3?),
})