Closed KTibow closed 4 years ago
Thanks for this! Though I would rather this use a mutation observer than a timeout.
I did a quick look, but just in case: is there anything else that was changed besides moving into a function with the hui-root timeout?
No, I un-indented it and put it through another differ: https://www.diffchecker.com/Ro9tRE3E I looked through some mutation observer docs to see what it is. Do you have any reccomendations for how to configure it, because I'm kind of new?
No worries, I'll work on it as soon as I can. I'm currently taking some time away in a cabin with poor internet, but will mess with it soon.
If you wanted to take a crack at it or just check out some uses of mutation observers working with Lovelace elements, I use them quite a bit in Custom Header ( in the custom-header.ts, in observers.js, and in menu-observers.js ).
Updated to trigger when a new dashboard is loaded, kept your timeout for hui-root. Wanted to post these changes before I lint the file so they're easier to see. Next commit will just be linting/formatting.
Going to pull this, but I'm going to try to address one or two of the other issues before actual release
FYI spelling:
swipeNavigaiton
swipeNavigation
(it
> ti
)
Had another typo elsewhere so this is fixed in the most recent release as well, thanks.
This fixes the behavior of it when it gets loaded, and Lovelace isn't open. It closes #21.