Examples > password-catalog PLUGIN.JS (2/5) CrossPoint.registerPlugin(async (container, api) => { const $ = (s) => container.querySelector(s); const b64 = (t) => { let s = ''; for (const c of new TextEncoder().encode(t)) s += String.fromCharCode(c); return btoa(s); }; const write = (name, obj) => api.writeFile(`${api.dir}/${name}`, b64(JSON.stringify(obj))); const read = async (name) => { try { const r = await fetch(api.pluginFile(name)); return r.ok ? await r.json() : {}; } catch (e) { return {}; } }; Next: 07 plugin.js (3/5)