From fc50092d41e7d639eb6780521bd1562e266b1cfb Mon Sep 17 00:00:00 2001 From: David Phillips Date: Thu, 11 May 2017 15:25:50 +1200 Subject: Throw out old crusty code that used document.write --- index.html | 1 + petrichor.js | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index 9eb88d2..af5bf0e 100644 --- a/index.html +++ b/index.html @@ -42,6 +42,7 @@ +
diff --git a/petrichor.js b/petrichor.js index bcb14d6..04b12dd 100644 --- a/petrichor.js +++ b/petrichor.js @@ -145,7 +145,7 @@ function update_time() function start() { - document.write('
'); + var html = ""; for (i in lightdm.users) { user = lightdm.users[i]; @@ -155,15 +155,16 @@ function start() else image = user.image; - document.write(''); - document.write(''+user.display_name+''); + html += ''; + html += ''+user.display_name+''; if (user.name == lightdm.autologin_user && lightdm.autologin_timeout > 0) - document.write(''); + html += ''; - document.write(''); + html += ''; } - document.write('
'); + + document.getElementById('users').innerHTML = html; time_remaining = lightdm.autologin_timeout; if (time_remaining > 0) -- cgit v1.1