document.addEventListener('DOMContentLoaded', function () {
    const jsOnlyElements = document.getElementsByClassName('js-only');
    for (var i = 0; i < jsOnlyElements.length; ++i) {
        var element = jsOnlyElements.item(i);

        element.className = element.className.replace('js-only', '').trim();
    }
});

'use strict';

document.addEventListener('DOMContentLoaded', function () {
    const jsOnlyElements = Array.prototype.slice.call(document.getElementsByClassName('js-only'));

    jsOnlyElements.forEach(function (element) {
        element.className = element.className.replace('js-only', '').trim();
    });
});

Fix code which removes js-only class
Fix code which removes js-only class
