From 0d9affe79d1557baedf010411799abdc1734773e Mon Sep 17 00:00:00 2001 From: David Phillips Date: Thu, 11 May 2017 15:21:59 +1200 Subject: 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. --- index.html | 5 +---- petrichor.js | 14 ++++++++++++++ 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 @@ - - +
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; -- cgit v1.1