(function (document, window) {
document.querySelector('#from-wordpress_mobile-navbar').innerHTML = `
`
document.querySelector('#from-wordpress_desktop-navbar').innerHTML = `
`
document.querySelector('#from-wordpress_footer').innerHTML = `
`
document.querySelector('#from-wordpress_mobile-links').innerHTML = ``
const scriptTag = document.createElement('script')
scriptTag.setAttribute('type', 'text/javascript')
scriptTag.setAttribute('src', `${window.location.origin}/wp-content/themes/negroniweek-child/dist/js/nw-scripts.js?ver=-b-modified-1527952020`)
document.querySelector('body').insertBefore(scriptTag, document.querySelector('#from-wordpress_mobile-links'))
window.addEventListener('load', () => {
window.updateTextLink()
})
window.updateTextLink = () => {
replaceTextLink('#nw_show_login', 'nw.account.title')
replaceTextLink('.menu-mobile-menu-container [href="/account"]', 'nw.account.title')
}
window.replaceTextLink = (selector, localStorageKey) => {
const nwLink = document.querySelector(selector)
if (localStorage.hasOwnProperty(localStorageKey)) {
const newLinkText = localStorage.getItem(localStorageKey)
if (newLinkText.length > 0) {
if (nwLink.children.length > 0) {
nwLink.innerHTML = nwLink.innerHTML.replace(nwLink.innerText, newLinkText)
} else {
nwLink.innerText = newLinkText
}
}
}
}
})(document, window)