diff --git a/src/app.js b/src/app.js index 289307b..de2379c 100644 --- a/src/app.js +++ b/src/app.js @@ -83,6 +83,9 @@ function createHamburgerMenu() { `; menu.innerHTML += `
+`; +menu.innerHTML += ` + `; document.body.appendChild(menu); @@ -136,6 +139,9 @@ menu.innerHTML += ` case 'editTitle': editPageTitle(); break; + case 'uploadAll': + uploadAllData(); + break; } menu.style.display = 'none'; }); @@ -153,6 +159,15 @@ menu.innerHTML += ` return { hamburger, menu }; } +function uploadAllData(tray = getRootElement().__trayInstance){ + if (tray.uploadData){ + tray.uploadData(); + } + if (tray.children.length){ + tray.children.map(t=>uploadAllData(t)) + } +} + function editPageTitle() { const currentTitle = document.title; const newTitle = prompt("新しいページタイトルを入力してください:", currentTitle);