var pmaWidgetInstance6038c00ad9685ed272d36535 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=6abc7e3e701b69e20d83621c1afc97b8:bf3a4992d241825c14be93e86bb75da0e8aa83fe5b0843af560dee5a59dcc4deeeff6391242de44e4b5d223f212e4ad637104e53a5eddfb85e750af71878074afb5376164d8500e9e8e582a08e898ac59077086c6941e3a77a5da6e718e943d14bbf309b6d4257abfcfeb6e34a4d3f5bb5e05626e9e83b280dbdbf4c2ab27d35e1f071cf96da87bf0c4ad90f0d0d354cdcd1113ce2fe9f52609bb14467b54fa57517019eeaa93c20045740db6eea96607ce8e2b7758658cdf4746dd5e2cdb2b1", shop_name: "MobilPC.sk", shop_logo: "https://y1.sk/t/s/130x50/46049.jpg", product_price: "469,40 €", 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(){ pmaWidgetInstance6038c00ad9685ed272d36535.initWidget("6038c00ad9685ed272d36535"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }