newPage
code:script.js
scrapbox.PopupMenu.addButton({
title: (text)=>{
if(text.split("\n").length < 2){
return undefined;
}
return '✂New Page';
},
onClick: (text) => {
const texts = text.split('\n');
const title = texts0.replace(/[\\\n]/g, '').trim(); texts.unshift(✂ from [${scrapbox.Page.title}]);
window.open(https://scrapbox.io/${scrapbox.Project.name}/${encodeURIComponent(title)}?body=${encodeURIComponent(texts.join('\n'))});
return ✂ to [${title}];
}
});
const styleElem = document.createElement("style");
styleElem.innerText = ".popup-menu .button-container .button.new-page-button{display:none;} .popup-menu .button-container .button.copy-plain-button:not(.button.strike-button + .copy-plain-button){border-left:none;}";
document.body.appendChild(styleElem);