var pmaWidgetInstance65098b724218328905dfb1c9 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=be6d71e77913842076f3bb0500b1c853:60a776597b8aeb38975ccba5ee78611b8986a18d1715fd8d1c8f66c697fe446ba95b63eddedbb57797abe96e7cf12ba547b785b4d9d696611ae2df760cf6694a76eca69e85dd1af5cdceb48192859d9e0f64d1581dd8a6f4218e5b7bed0cdae0191e67f39ff8f66817bded0df819eb7106f46a7c613b37ddbf4e269c6e592471df6ca1eabf4d89cfd623062d48b04a162648dcc9b6ebb2a1c2d095b84a3f6285644235f22cdc301517d8f0b62a517f6b294f5fac3e5d160cd4a8cfe3ca22779abb2a04232ee85aa6eb96d186de2cec7d", shop_name: "kotollacno.sk", shop_logo: "https://y1.sk/t/s/130x50/52905.jpg", product_price: "5479 €", product_shipping: "0,00 €", 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(){ pmaWidgetInstance65098b724218328905dfb1c9.initWidget("65098b724218328905dfb1c9"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }