var pmaWidgetInstance603cb4e5d9685ed2720e317b = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=eab6fd32ef45976d82f1545c86c4b1c8:7516068d7ce8299b20bb229823b791f03fd1bef9b84f2a32c05bc6d942f2578d080612ff8277c8ee9d53ad988ef81bb6c6bf84faff824cb3a591008565a6abf2d75d3b845959a0128a8f299080d072d99bb92015dbc3c6d7d7f264d75199cd3a2294e4c0e16008f730d21b89b9d69dd9d82f5dacd218864ae7a5db5e0d476d2252f4d1fd98f8ca5506f8ea6e5ff62b676ed5d860dcb9b83199b386184fae5f1a26568765cba41ad9148dfd5dd054fe463ac8ece4c87d61c979dc1a62963be379000304bf4808785271a018c9734ac8a3", shop_name: "najlepsiemobily.sk", shop_logo: "https://y1.sk/t/s/130x50/60405.jpg", product_price: "704,00 €", 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(){ pmaWidgetInstance603cb4e5d9685ed2720e317b.initWidget("603cb4e5d9685ed2720e317b"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }