script.jsconst buttonFileName = 'button.';
document.getElementById('editor').addEventListener('click', async e => {
const t = e.target;
if (!(t.tagName === 'IMG' && t.classList.contains('icon') && t.title.endsWith('-button')))return;
e.preventDefault();
e.stopImmediatePropagation();
try {
const path = `../${encodeURIComponent(t.title)}/${buttonFileName}`
const {execute} = await import(path);
execute();
} catch(e) {
console.log(e);
}
});