var pmaWidgetInstance63e4f48742183289055ee150 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=661f52e2a563dc888c55af78744ed9ea:4b4441f8819b070555b1348a8bf650aa188c56ce4233b082b852dbca8345c09ad92ca7cb02a625cad0a5de169f774010ab6c74a9dc88cb714e6691bf12fcb2f8a5afcb56ee9d78eb308ad36b67c01988f8ad1b45fc96b0446ccc49fe65318e396566c74b075db0d905c486d7006b5adb9f0011cb092be8c79a6f2e37b884171016a70951afd6a04ca97484581cdcd23efbca7535a41000e56f012cdd070a3fc9124cd8249f68e49e820c55433e92610fd759d5d858aa8f3fe4cf9a70d8041b919113e592287585cf51fb7792f8a59940", shop_name: "klarstein.sk", shop_logo: "https://y1.sk/t/s/130x50/52719.jpg", product_price: "68,23 €", product_shipping: "0,00 €", product_availability: "", 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(){ pmaWidgetInstance63e4f48742183289055ee150.initWidget("63e4f48742183289055ee150"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }