var pmaWidgetInstance603f65aad9685ed2723d4d74 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=1db0d50a5c9610201b83256e3c2af90c:c29e32ac7054df9ec5643317beb3e6a8b57e3cd8320bd4133e45753113e32ae23777c8eef7c9032bec5743d4f3fd3821282f8eb176d23afb64573c2a71aa6ca7824f72bf1f67153cf9934fecd8830b1c37da36ede69814e0677fb35051fa06d5c179a36cc3f3bc5a5cf8f2989ac604d6895b63da57e573c195bfb04dd4a299e53097e2fb6464bcd9d731334daf817a0e2e154fa35a93bdcf3680e206362e1d8677135acd9e92838839e1900d8dffd2a4ff88408bcb1244d5b2706ee1765cbc14", shop_name: "profizoo.sk", shop_logo: "https://y1.sk/t/s/130x50/54095.jpg", product_price: "35,41 €", product_shipping: "5,16 €", 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(){ pmaWidgetInstance603f65aad9685ed2723d4d74.initWidget("603f65aad9685ed2723d4d74"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }