var pmaWidgetInstance6086fc0b3975337b9e8d1043 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=d448e9c94c126fb9b42fd8137f1a4e75:d09649ad72b5c6fdd8df65fbadeecfb891eaf99451216eb67109a833edd4838e92508e1544ee6f56b4fe6052b35e54dd2a13d79bd62f646e1648d49d9323740a57a9308c52735f779b21f128b956b66bcb2b8d92f8d465b26a3ab9b6ea1823f9c7f4c76fae8b63d9f185fed78b6cbfbcaeffa75cb1a21800a0ebeb0d79750798b60f145f3cead7f4a90ae5d36d09770df7178a433748864a8e435901213f3f5e96d31df39901633fdfdf82cbd14914a85dc1664f2e7bc88d650e370c1ed9a793", 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(){ pmaWidgetInstance6086fc0b3975337b9e8d1043.initWidget("6086fc0b3975337b9e8d1043"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }