var pmaWidgetInstance6006dc04d9685ed272b275c6 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=8a69e864ef0feb2ac3cad53714a6ca73:566e895d59424b83b0ada9bf58feb6dcdf655d226981a5a7b0cdee540ed92589d1ecf0daa4ed8a481ae3662ca2e80a0dd7cb761276821a5daa12ae73af76510bf0131d980e6ab8182f86ab987a8b465723fc8a36f99d60db54a2ca0863f5c235a04688a3c7a4ae132517d9397065a01f057bf157b50b173a56e89e392de759737c0131a4c5c61371a69e504e445ccb8e7d541bb406f5e1508b1b4c1ac7aa1354620144e6169d2cc4d6bb001261095ff45939d4a8faa0d0b4bf976e1b5010a121", shop_name: "GymBeam", shop_logo: "https://y1.sk/t/s/130x50/46829.jpg", product_price: "14,95 €", 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(){ pmaWidgetInstance6006dc04d9685ed272b275c6.initWidget("6006dc04d9685ed272b275c6"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }