diff --git a/external-title.html b/external-title.html index 190993e..0f77bc7 100644 --- a/external-title.html +++ b/external-title.html @@ -54,7 +54,9 @@ ipc.send("external-title-resize", largerSpanW + 16); } else turnSmallerResizer(); titleNode.parentNode.removeChild(n); - titleNode.style.width = spanW + 'px' + titleNode.style.width = spanW + 'px'; + + ipc.send("sync-timer-win-title", { title: titleNode.value, notes: notesNode.value }) } let notesNode = document.getElementById("notes"); @@ -75,7 +77,9 @@ ipc.send("external-title-resize", largerSpanW + 16); } else turnSmallerResizer(); notesNode.parentNode.removeChild(n); - notesNode.style.width = spanW + 'px' + notesNode.style.width = spanW + 'px'; + + ipc.send("sync-timer-win-title", { title: titleNode.value, notes: notesNode.value }) } function turnSmallerResizer() { diff --git a/main.js b/main.js index 8c16f0b..31ec322 100644 --- a/main.js +++ b/main.js @@ -1849,6 +1849,23 @@ ipcMain.on("open-external-title-win", function (event, message) { externalTitle(title, notes); }) +ipcMain.on("modify-external-title-win", function (event, message) { + if (externalTitleWin != null) + externalTitleWin.webContents.send('send-title', { + title: message.title, + notes: message.notes + }); +}) + +ipcMain.on("sync-timer-win-title", function (event, message) { + if (win != null && isTimerWin) { + win.webContents.send('sync-title', { + title: message.title, + notes: message.notes + }) + } +}) + ipcMain.on("external-title-resize", function (event, message) { if (externalTitleWin != null) { externalTitleWin.setSize(Math.floor(Number(message)), 84); diff --git a/timer.html b/timer.html index a83facd..6549083 100644 --- a/timer.html +++ b/timer.html @@ -50,16 +50,28 @@