var pmaWidgetInstance63f9de6c4218328905b51868 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=b7097f5a25dec5f609fc04f36e241473:4907d4ba72aac9977464bbe2ddd863607f59b8b5806d80d9e2c38d5a00feaed0025dbdb72b8354a9b74d9fb0ed883fe66b6cd513ca4b5af76ce40a57a25af41dd19ccae6f5470ea8c6733edbd50dbb70300a650fa49b5bf805adfacce6ff1d2c359d9807813e3064cd57c875bf133fb7b5f57f99b175c0138164c59c0e51d7ca36002396e407da0c5bd8d5d3836401439a93d60d7273f5c69e5af5d2eb8a33c5e3628d47b44202a294fd67d296a0658e0dac01322264e16ef9fe66780ecce4a9a9f880a431468c2432070ac449c4d21f", shop_name: "electronic-star.sk", shop_logo: "https://y1.sk/t/s/130x50/44673.jpg", product_price: "186,90 €", product_shipping: "2,99 €", 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(){ pmaWidgetInstance63f9de6c4218328905b51868.initWidget("63f9de6c4218328905b51868"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }