gist for DOMContentLoaded