Skip to content

Instantly share code, notes, and snippets.

@tyom
Created June 27, 2018 16:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tyom/227bfc562fc65138a816ed3a273a5dd2 to your computer and use it in GitHub Desktop.
Save tyom/227bfc562fc65138a816ed3a273a5dd2 to your computer and use it in GitHub Desktop.
Insert in the head of the document to replace `no-js` class with `js-enabled` before `body` gets parsed.
<script>(function(d){d.className=d.className.replace(/\bno-js\b/,'js-enabled')})(document.documentElement)</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment