encrypt
code:script.js
scrapbox.PopupMenu.addButton({
title: 'encrypt',
onClick: text => window.btoa(unescape(encodeURIComponent(text))).split('').map(function(c) {
switch(~~(3 * Math.random())) {
case 0: return ("" + c + "");
case 1: return ("" + c + "");
case 2: return ("" + c + "");
}
}).join('')
})
scrapbox.PopupMenu.addButton({
title: 'decode',
onClick: text => decodeURIComponent(escape(window.atob(text.replace(/\[<\|> .\]/g, s => s.charAt(3))))) })