var pmaWidgetInstance603c9481d9685ed272e4f506 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=15caaac349ad0d2a6a98e3a1f3de8f51:edab4aa07e56ed77554262f15f9b9b49d8ef4b4fe0001f7aefbe4ce7c7140dfce612ec16f361daf63ac255f8f00255801c69fa89fa3afc871c2bf95dc060150ea84703d8169908aa66f3b512a00848e9fe40d65122c4a536ad83cb8ed1ca1b4d10f15aadf51ad4b2cfe6ac7babed8a5a102a6623f6ce6fe9a2d37f616a814fa25e4b95cac8141b8dc25d5438a00a398a1ac841e195e3c0335f64f9f50013216ad892a1ccf16f788b997c789d157fd5018a4aa174f26051f954ed03c9ed14d4f5eb381405639557b1eea4bb9a0c37dc5d", shop_name: "bi-xenony.sk", shop_logo: "https://y1.sk/t/s/130x50/52841.jpg", product_price: "17,40 €", product_shipping: "1,00 €", 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(){ pmaWidgetInstance603c9481d9685ed272e4f506.initWidget("603c9481d9685ed272e4f506"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }