Skip to content

Instantly share code, notes, and snippets.

@kudinovfedor
Created April 7, 2019 19:44
Show Gist options
  • Save kudinovfedor/937428793ccfed01b6f5f82e7f5025b2 to your computer and use it in GitHub Desktop.
Save kudinovfedor/937428793ccfed01b6f5f82e7f5025b2 to your computer and use it in GitHub Desktop.
Replace class no-js to js on html element (check if javascript is enabled)
((html) => {
html.className = html.className.replace(/\bno-js\b/, 'js');
})(document.documentElement);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment