commit 270b616916fc37db2c35d76b01c2499abff1b442
parent 6a8083c7e92a23fac5c0bd4e7b73723d6e2c88b8
Author: Hunter
Date:   Wed, 31 Jul 2024 09:15:17 -0400

page title = current parent's text; add favicon

Diffstat:
Mtodo.html | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/todo.html b/todo.html @@ -3,6 +3,7 @@ <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🪆</text></svg>"> <title>todo</title> <style> body { @@ -443,6 +444,7 @@ currentTask = taskPath[taskPath.length - 1]; updateBreadcrumbs(currentTask); + updatePageTitle(currentTask); const parentElement = createTaskElement(currentTask, true); appContainer.appendChild(parentElement); @@ -482,6 +484,10 @@ } } + function updatePageTitle(task) { + document.title = task.text || 'todo'; + } + renderCurrentView(); }); </script>