From 13e4bf98eddc9b407aee42518ef0cb6356ccacdb Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 28 Nov 2022 20:32:06 +0100 Subject: html: set document title --- html/index.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'html') diff --git a/html/index.html b/html/index.html index 25a1651..d8ce009 100644 --- a/html/index.html +++ b/html/index.html @@ -1,6 +1,7 @@ + wg-api-web @@ -351,7 +352,9 @@ function peers_remove_all() { function device_show() { let formatter = new Device(); let data = JSON.parse(this.responseText); - formatter.update(data['result']['device']); + data = data['result']['device']; + document.title = `${data['name']} - ${data['num_peers']} peer(s) - wg-api-web`; + formatter.update(data); } function peers_show() { -- cgit v1.2.3