UserScript that, when executed on a Scrapbox page, creates a page in a private project with a key in the title, and the earth symbol is a link to the original page.
script.js
const privateProject = "..."
scrapbox.PageMenu.addItem({
title: 'toπ',
onClick: () => {
const title = document.location.pathname.split("/")[2];
window.open(`https://scrapbox.io/${privateProject}/π${title}`, "_blank")
}
})
scrapbox.PageMenu.addItem({
title: 'makeπ',
onClick: () => {
const title = document.location.pathname.split("/")[2];
const body = `[https://scrapbox.io/nishio/${title} π] [${title}]`
window.open(`https://scrapbox.io/${privateProject}/π${title}?body=${body}`, "_blank")
}
})
This page is auto-translated from /nishio/toπ using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. Iβm very happy to spread my thought to non-Japanese readers.