var pmaWidgetInstance65f03b9aae16db34667a408d = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=687b6142153f3dd7eadbe26ac70ee30d:8a86b2b5038c0aa19c936b83fd51e2c47f338652984e2d9eb6c75aa470fbb8e8bdd3e09b48c494b1c145c7158ea0e1d47359551a4f3386c7ab1e572374959bff7117621e30a2f00b044c388d68199131b952a7bc56bed54955efe88254ed6d886639e5b0095ab209026a745a6fe9398f625b9f81804c2ca74bcb2e8c3bc45981ab46029f7124bba535e2b3c4c30b8e806d6aa77dd95f0dd5aa325b7e63e734024f7e4f688ba624298d31a4e1fd0329fe0516075a853685d13868bab372d5130fed4a39cfb372da081c1c2e12d56a30a3", shop_name: "MobilPC.sk", shop_logo: "https://y1.sk/t/s/130x50/46049.jpg", product_price: "33,60 €", product_shipping: "2,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(){ pmaWidgetInstance65f03b9aae16db34667a408d.initWidget("65f03b9aae16db34667a408d"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }