var pmaWidgetInstance6361326bac365ae374c8f1ec = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=73cc7a45bd1adb05e7d2625accc52f2c:42f4ea105267c30b78190da63d6830c0ad70bee4863b5c63e034246dbcdfa0b0a0145d4679ed408ee8f59c632cf7211493e2c3a0ecbe71afe6fc075bebbbf12d3bb053cd77bcf1de115167bfd2545a67f001149ff93cd7e370c17dc78e5ee610b449a781639933b3958a1ee1c45bb9e4dfe3c5384c2bc739f3eef7cf2661c0d1764c987eb6d39b92ba0e0e8f51e5b209ee74896c2466f4e6978c5655df48bfcaf2510a583b10000e2fcd71fdf32b9264f62805103840ea20da95ac7d39201186fbe6d6c4e4cf3f3c08e2deb7510e6d05", shop_name: "pneunaj.com", shop_logo: "https://y1.sk/t/s/130x50/52071.jpg", product_price: "269,80 €", product_shipping: "", 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(){ pmaWidgetInstance6361326bac365ae374c8f1ec.initWidget("6361326bac365ae374c8f1ec"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }