var pmaWidgetInstance5fcf70ded9685ed2723c213d = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=c849fc7597184ee03d9b804b8249287b:97819a2441736382492b5f0a58b8ce63a12712ae9903de050d7befc6d218cd95a36020dbd3ca201ce3293fd0d8ed1e88b5cea265f614c52f087132de1750524cf4a727538989b762a82d9aaa492bbfdaab7f55b389c46d0384a27c942b8f22243b001c9b8d35c2c309f543eedbd81327e5d0cd536962521d43742708bdb3b1fd76586de98fccbd147dd83a2005abc8b1b0c15fa26806e3ce1714d8c6b2c9c6fa89d56d0c27a71814c1837ab9185346c72806e3e508a51fafcd634c4a3dd7fe9bd926bfd21c24b89b9ca2945a258afd69", shop_name: "nejlevnejsizbozi.cz", shop_logo: "https://y1.sk/t/s/130x50/12756.jpg", product_price: "82,45 €", product_shipping: "", product_availability: "Skladom", initWidget: function(widgetId){ this.insertLinkToButton(widgetId); }, insertLinkToButton: function(widgetId){ const instance = this; const btns = this.findButtonWidgets(widgetId); for(var btn of btns){ instance.insertButtonVariables(btn); if(btn.tagName == "A"){ btn.href = this.exitLink; btn.target = "_blank"; btn.rel = "nofollow"; } else { btn.onclick = function(event){ event.stopPropagation(); window.open(instance.exitLink); } } } }, findButtonWidgets: function(widgetId){ var currentModalButtons = []; var modalButtons = document.getElementsByClassName(`pma-widget`); for(var modalButton of modalButtons){ if(modalButton.getAttribute('data-id') == widgetId){ currentModalButtons.push(modalButton); } } return currentModalButtons; }, insertButtonVariables: function(element){ element.innerHTML = element.innerHTML.replaceAll("{{shop_name}}",this.shop_name?this.shop_name:""); element.innerHTML = element.innerHTML.replaceAll("{{shop_logo}}",this.shop_logo?this.shop_logo:""); element.innerHTML = element.innerHTML.replaceAll("{{product_price}}",this.product_price?this.product_price:""); element.innerHTML = element.innerHTML.replaceAll("{{product_shipping}}",this.product_shipping?this.product_shipping:""); element.innerHTML = element.innerHTML.replaceAll("{{product_availability}}",this.product_availability?this.product_availability:""); } } docReady(function(){ pmaWidgetInstance5fcf70ded9685ed2723c213d.initWidget("5fcf70ded9685ed2723c213d"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }