aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.html5
-rw-r--r--petrichor.js14
2 files changed, 15 insertions, 4 deletions
diff --git a/index.html b/index.html
index 4ed4e6b..9eb88d2 100644
--- a/index.html
+++ b/index.html
@@ -2,11 +2,8 @@
<head>
<link rel="stylesheet" type="text/css" href="petrichor.css" />
<script src="petrichor.js" type="text/javascript"></script>
- <script type="text/javascript">
- start();
- </script>
</head>
- <body onclick="reset();" onload="load();">
+ <body onclick="reset();">
<div id="date-container">
<div id="date"></div>
<div id="time"></div>
diff --git a/petrichor.js b/petrichor.js
index dd20bfe..bcb14d6 100644
--- a/petrichor.js
+++ b/petrichor.js
@@ -174,4 +174,18 @@ function load()
{
update_time();
build_session_list();
+ start();
}
+
+/* Temporary hack until webkit greeter 3.
+ * The fact this is needed frankly makes me shudder. */
+function try_load()
+{
+ if (typeof lightdm !== 'undefined') {
+ load();
+ } else {
+ setTimeout(try_load, 500);
+ }
+}
+
+window.onload = try_load;