(function() { try { var pid = '28678'; var pidParam = 'pid'; var tid = 'skrypt'; var tidParam = "tid"; var hosts = ['ceneo.pl', 'www.ceneo.pl', 'm.ceneo.pl']; var checkLinks = function() { var links = document.getElementsByTagName('a'); for (var i = 0; i < links.length; i++) { if (!links[i].href) continue; var url = new URL(links[i].href); if (hosts.includes(url.host)) { if (!url.href.includes(pidParam + '=')) { if (url.hash) url.hash += '&'; url.hash += pidParam + '=' + pid + '&' + tidParam + '=' + tid; links[i].href = url.href; } } } } window.addEventListener('load', function() { checkLinks(); var body = document.body; var config = { attributes: true, childList: true, subtree: true }; var observer = new MutationObserver(checkLinks); observer.observe(body, config); }); } catch (e) {} })()