var pmaWidgetInstance60472746d9685ed27208ccb4 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=0be5f0d2c4f894398f803d5ca4941169:251071540f65f984e6e90ff84f62a1be6ce1b9eaf7156a7ae41169454fd900871dff5dbc4b2604f0c1e55397193fa6dce702a63803d4f429070f129df2f69a8008ea17e80c4cd609f671818db2293f39d1c7cc708851bd6b077176779a853a661124db6e5d59903a288d033b9bf1f2461f1b51a66523102368f3d061716f133f7ac28cce5eb4f299c38399359c1cd599c6348e2c215a67dfad6fb3bc8515ad7d9644e6d636cef77adeab2f7b7614b3547ac8cd5e2f119b304d42d83fff5a6fc0d5fdc23f010448d3e565a05dd6cdeb76", shop_name: "antenka.sk", shop_logo: "https://y1.sk/t/s/130x50/59415.jpg", product_price: "375,00 €", product_shipping: "", 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(){ pmaWidgetInstance60472746d9685ed27208ccb4.initWidget("60472746d9685ed27208ccb4"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }