diff --git a/static/themes/default/js/main.js b/static/themes/default/js/main.js
index 412ad493a..eaeb86b03 100644
--- a/static/themes/default/js/main.js
+++ b/static/themes/default/js/main.js
@@ -22,6 +22,17 @@
for the JavaScript code in this page.
*/
+/*
+ * Remove the 'no-js' class from the element. CSS utilizing this can
+ * create different rules when Javascript is available and when it is not. This
+ * functionality was provided by the Modernizr library earlier.
+ */
+document.addEventListener('DOMContentLoaded', function(event) {
+ const html = document.querySelector('html');
+ html.classList.remove('no-js');
+ html.classList.add('js');
+});
+
/*
* Refresh page if marked for refresh.
*/