Settings" >>> "Advanced" >>> "Code Injection."
In the "Footer" section, paste the JavaScript code wrapped inside the <script> tags.
Save your changes and close the Code Injection panel.
Preview or publish your site to see the underlined links in the site navigation menu.
<script>
document.addEventListener('DOMContentLoaded', function() {
var navLinks = document.querySelectorAll('.header-nav-item a');
for (var i = 0; i < navLinks.length; i++) {
navLinks[i].style.textDecoration = 'underline';
}
});
</script>