aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.html1
-rw-r--r--petrichor.js13
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 @@
</li>
</ul>
</div>
+ <div id="users"></div>
<select id="session-list" class="ease-opacity"></select>
<img id="shutdown" class="ease-opacity" src="image/iec5009.svg" onclick="show_element('power-confirm');show_element('mask');" />
</body>
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('<div id="users">');
+ var html = "";
for (i in lightdm.users)
{
user = lightdm.users[i];
@@ -155,15 +155,16 @@ function start()
else
image = user.image;
- document.write('<a href="#" class="user" id="user-' + user.name +'" onclick="start_authentication(\'' + user.name + '\')">');
- document.write('<img class="avatar" src="file:///' + image + '" /><span class="name">'+user.display_name+'</span>');
+ html += '<a href="#" class="user" id="user-' + user.name +'" onclick="start_authentication(\'' + user.name + '\')">';
+ html += '<img class="avatar" src="file:///' + image + '" /><span class="name">'+user.display_name+'</span>';
if (user.name == lightdm.autologin_user && lightdm.autologin_timeout > 0)
- document.write('<span id="countdown-label"></span>');
+ html += '<span id="countdown-label"></span>';
- document.write('</a>');
+ html += '</a>';
}
- document.write('</div>');
+
+ document.getElementById('users').innerHTML = html;
time_remaining = lightdm.autologin_timeout;
if (time_remaining > 0)