page-export-script
copy from /blu3mo-public/ページ転送する拡張script
code:script.js
export function exportPage(projectName) {
// scrapbox以外のページとapiのページはexport対象から外す
if (document.domain != 'scrapbox.io') return;
if (!scrapbox || scrapbox.Layout !== 'page') return;
const currentProjectName = scrapbox.Project.name;
const currentPageName = encodeURIComponent(scrapbox.Page.title);
let date_ob = new Date();
let date = ("0" + date_ob.getDate()).slice(-2);
let month = ("0" + (date_ob.getMonth() + 1)).slice(-2);
let year = ("" + date_ob.getFullYear());
// タイトル以外の行を取得する
const body = encodeURIComponent(scrapbox.Page.lines.slice(1).map(l => l.text).join('\n'));
const newLine = "%0A"
const url = https://scrapbox.io/${projectName}/${currentPageName}?body=${body}${newLine}${newLine}from: [/wogikaze-study/${currentPageName}];
console.log(url)
window.open(url);
}