Facebook

`; elementInsertAfter.insertAdjacentHTML('afterend', shareHTML); const contentWrapper = document.querySelector('.all-content-wrapper'); const copyEL = document.querySelector('.share__btn .share-copy-link'); copyEL.addEventListener('click', () => { contentWrapper.insertAdjacentHTML('afterend', ``); copyLink(copyEL); // Remove the element after 5 seconds setTimeout(function () { document.querySelector('.notification').innerHTML = ''; }, 5000); }); } window.createShareSocialBtn = createShareSocialBtn }); window.REBELMOUSE_TASKS_QUEUE.push(function(){ const li = document.querySelector("li.rm-breadcrumb__item--primary_section_slug"); if (li) { const validLinks = Array.from(li.querySelectorAll("a.rm-breadcrumb__link")) .filter(link => link.textContent.trim().length > 0); validLinks.forEach((link, index) => { if (index { const href = link.getAttribute('href'); if (!href) return; const url = new URL(href); let path = url.pathname.replace(/^\/+/, ''); if (path === '') { if (edition === 'north_america') { link.setAttribute('href', 'https://investingnews.com/'); } else if (edition === 'australia') { link.setAttribute('href', 'https://investingnews.com/au/'); } else if (edition === 'world') { link.setAttribute('href', 'https://investingnews.com/world/'); } return; } if (edition === 'north_america') { const restoredPath = path.replace(/^(au|world)\//, ''); link.setAttribute('href', `https://investingnews.com/category/daily/${restoredPath}`); } else { if (edition === 'australia') { edition = 'au'; } const newPath = `${edition}/${path}`; link.setAttribute('href', `https://investingnews.com/${newPath}`); } }); } // Function to get the value of a cookie function getCookie(cookieName) { var name = cookieName + "="; var decodedCookie = decodeURIComponent(document.cookie); var cookieArray = decodedCookie.split(';'); for (var i = 0; i