var pmaWidgetInstance6030b852d9685ed272412574 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=0365b6e3ef89051be89e82eee52070bb:7f621e77861996c2d6fdb57eed081118fce07ceee4261d4b11c0b7a93e6ca78b5866af644645748639455dbd0754fdf3264a9c7e10654f253d6d14a7441f903c483af2bf2e3c5bfd29ae68e8b462a9496838766ec1b6b036f3ebef2a0a05ba3d22f60e6cb692485e62b95b4fde3c93d88ca91bab9bf0629f269005dd9045a9ff4758dc73aa9989c92c0bd8b00b659001083b1f46f2ad03bc94cf31c4fe495469187644398f0721f558a637eca80b18342a0c866ba281b09aebc04cc8a0b299bf", shop_name: "GalaxyMarket", shop_logo: "https://y1.sk/t/s/130x50/59525.jpg", product_price: "52,29 €", product_shipping: "3,50 €", 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(){ pmaWidgetInstance6030b852d9685ed272412574.initWidget("6030b852d9685ed272412574"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }