var pmaWidgetInstance6037a2c1d9685ed272537342 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=12161fd98fda9e34015bddec243caf4e:263a29df938bd559fd3b134c73c374f60cf3d09a331b63919853d320667c7c1fd7b52d02c0b2bcca448be0297df583b83a59e406f57dd184b35fb1686edde0f8b0e92d7be6dc15ea8d16dfe3cf8b68e0ecf773f0c81ea602a65cb7393f21b1bfd8b1e0577b690bc05a6491730a5cd31a8736b0e0fdfd836b6657328cd47d1be3f2cf695ea3b88f13672ba8680a8db79b95590c47a7d14cd84e37689ccdd3682b042e2fa2adae64948281379918546aff4bba40ec9e9b1618ee585bc3551c85e2", shop_name: "MobilPC.sk", shop_logo: "https://y1.sk/t/s/130x50/46049.jpg", product_price: "103,00 €", product_shipping: "3,90 €", 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(){ pmaWidgetInstance6037a2c1d9685ed272537342.initWidget("6037a2c1d9685ed272537342"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }