ScrapboxにShare Menuを追加するUserScript
#UserScript
code:script.js
scrapbox.PageMenu.addMenu({
title: 'share',
image: 'https://gyazo.com/0e85f41dbf68be7d5d1db1b1b683d4cc/raw'
});
scrapbox.PageMenu('share').addItem({
title: 'Tweet',
image: 'https://twitter.com/favicon.ico',
onClick: () => window.open(https://twitter.com/intent/tweet?url=${encodeURIComponent(location.href)}&text=${encodeURIComponent(window.scrapbox.Page.title)})
})
scrapbox.PageMenu('share').addItem({
title: 'Hatebu',
image: 'https://b.hatena.ne.jp/favicon.ico',
onClick: () => window.open(https://b.hatena.ne.jp/add?url=url=${encodeURIComponent(location.href)})
})