Instead of only attaching a DOMContentLoaded event listener to document, the script now checks whether domReady state is not 'loading' anymore and then initializes the UI and JS logic. If the domReady state is still 'loading', the event listener is attached like before. This prevents the script from missing the event.
Instead of only attaching a DOMContentLoaded event listener to document, the script now checks whether domReady state is not 'loading' anymore and then initializes the UI and JS logic. If the domReady state is still 'loading', the event listener is attached like before. This prevents the script from missing the event.
Fixes: #377