var pmaWidgetInstance64d4d8df421832890560437f = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=c52db2ad4b0fb631165b14e85fa788cc:0c6df0309ba334a649c7438d905bc0edc19006a6ceb8e836a469fc5f3b5725442f81b5f94a3d39e17b34fb12cd969899c0cf12cfef51b5723d30c820ef1e35f18953ac4f975e4e93b74ae2580a4813aec8ee056a49547456c13a3d77000fb1532c076e2a61b07589c77dc156de98f2cc8bad25bfb5a9c6be7472adbbb4e57e3ea9bb875c24a2d5a2f089e0cc89d828cdaee267b824531e3d00e75ea644d497a87ff2867fc36d3261af97269f3d824f8cbf96f34c125a9d5e772c4568f3c1e284ff27694be8ef8e9838cd45c5f4e6cb35", shop_name: "pomocnik.sk", shop_logo: "https://y1.sk/t/s/130x50/42713.jpg", product_price: "64,00 €", product_shipping: "4,90 €", 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(){ pmaWidgetInstance64d4d8df421832890560437f.initWidget("64d4d8df421832890560437f"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }