Kontaktujte nás
Otevírací doba
Všechny dny 09:00 – 18:00
(function() { 'use strict'; function forceLinksToSameWindow() { const allLinks = document.querySelectorAll('a[target]'); allLinks.forEach(function(link) { link.removeAttribute('target'); if (link.getAttribute('rel') === 'noopener') { link.removeAttribute('rel'); } }); console.log(`Modified ${allLinks.length} links to open in same window`); } function observeNewLinks() { const observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { if (mutation.type === 'childList') { mutation.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A' && node.hasAttribute('target')) { node.removeAttribute('target'); if (node.getAttribute('rel') === 'noopener') { node.removeAttribute('rel'); } } const linksInNode = node.querySelectorAll('a[target]'); linksInNode.forEach(function(link) { link.removeAttribute('target'); if (link.getAttribute('rel') === 'noopener') { link.removeAttribute('rel'); } }); } }); } }); }); observer.observe(document.body, { childList: true, subtree: true }); } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', function() { forceLinksToSameWindow(); observeNewLinks(); }); } else { forceLinksToSameWindow(); observeNewLinks(); } window.addEventListener('load', forceLinksToSameWindow); })();