aboutsummaryrefslogtreecommitdiff
path: root/petrichor.js
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2017-05-11 15:21:59 +1200
committerDavid Phillips <david@sighup.nz>2017-05-11 15:21:59 +1200
commit0d9affe79d1557baedf010411799abdc1734773e (patch)
tree740854514ade1df1ec8dd814bab28d3f07c6d717 /petrichor.js
parent6757e6daf68ce27786dfae2f9e1da1222ee3e976 (diff)
downloadpetrichor-0d9affe79d1557baedf010411799abdc1734773e.tar.xz
Poll for the presence of `lightdm` variable
Fixes an issue reported by Oscifer on the AUR package. webkit2 greeter devs report that this should be fixed in version 3 of the greeter with a callback being introduced.
Diffstat (limited to 'petrichor.js')
-rw-r--r--petrichor.js14
1 files changed, 14 insertions, 0 deletions
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;