var pmaWidgetInstance6050c52ad9685ed272435577 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=fafd1a9dc6950ed74581e091a35a53d3:a3ca89bd0de50a061949f5bda0aad70fc1ebc3b74dd8dabf29b0e6642f7f7d32404e607c14765c327949071c1a12dbcd53e53285e1f90e36b7360056dcb051bf85ec2f718010f095b8abc9a621326902ec2b012640f5df8430830a92567d561243c22b0388ba5a9d204ae4088466cab87804cd852e32f83615b0aa68660ec67c7433db1a3d89114644a6226e860df22320077b6a1ddde81d7542a95c37423a183237c538d3196701f72b0e744d0df198c674f397b93d30a66cd4a9f922bd1ab2", shop_name: "pneunaj.com", shop_logo: "https://y1.sk/t/s/130x50/52071.jpg", product_price: "196,99 €", 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(){ pmaWidgetInstance6050c52ad9685ed272435577.initWidget("6050c52ad9685ed272435577"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }