var pmaWidgetInstance603cbbecd9685ed272250833 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=88a5f668aee66a3971f9cd7c009fe3a1:35cdd27bde4caa2c91aa74d7f0fff333e695cc86645641fe25627c3eb5d2e8fd6cbc499ffd12038a228f97bdbfc1bd94a3e11b35bbca48470e60b5c2211312d4c1e11a1ed469e2e7103e369ec6a16d5fd6218210851ac6e5912eb02d7d77f7005721e01ace0abc4da6ae52081a426ed6297fcbce2e76522ce920cd6364711998c546ac42fdc17e527234d49b6d04409153af5fc535944ffeb29634df41a416ec9349c21b1eb5fd77ac52f3540720d74d5bbc7839b93b93a54f655bdb08a56094951ba371487e31ab14e91ecd9d342dae", shop_name: "antenka.sk", shop_logo: "https://y1.sk/t/s/130x50/59415.jpg", product_price: "375,00 €", product_shipping: "", 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(){ pmaWidgetInstance603cbbecd9685ed272250833.initWidget("603cbbecd9685ed272250833"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }