var pmaWidgetInstance6012914bd9685ed272e3560b = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=59116002f849e0d2c52d381d7bc5e60e:fa43fe28511760998417dba143fab610cb45e8b3b758549307d989760a176c34ab30902766cbdafccc82f8bd182a714d29318bb70c59facb87a0717509a5d693dfa47510be92d82b7eb2f3ac4c384d3154232091e52888d30c133b278e84c0ef48cdfaa96ca0e866432398226c3647824122be1feea9ce8091d5c5fdc5a901b042024f67b82fe3032f12593262b8570dd6d3faaa3d1c955885c61f63edafaffd39a67beff45d7fa280ae915ed39fc4070cafa6390cf98ba59071e4b14fc745d5", shop_name: "lekarenvkocke.sk", shop_logo: "https://y1.sk/t/s/130x50/57146.jpg", product_price: "4,08 €", product_shipping: "2,19 €", 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(){ pmaWidgetInstance6012914bd9685ed272e3560b.initWidget("6012914bd9685ed272e3560b"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }