var pmaWidgetInstance61516bb80067a2ef598c9e4a = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=90b38970a95791dc2fd5127cd8236de2:0891b98959f2cabfbb031c9fe152d1c2082e879fa74cf88b7eaf2efb16d3cd46d991cbe189b2fc0415ece9234e6a5b95cb7832abe6699f2a5f54f891a61397b89ffe32f1dd6c52ec7fb06455e4573cd60bfc25391133e2fccfc640c7ebd82b47a5c4829ae7cfbe6780c5c7ddf6213f6833047219e5b75b8559d455797db14e0f17a92f862b837799314b7598866b532341c935a8fc58bf8534a1ac7eb6f28cbf10e5bcbbb4dbda5dd16208ad71f7b8a2ef966bb822c6a087b002d4dd653b8580", shop_name: "MobilPC.sk", shop_logo: "https://y1.sk/t/s/130x50/46049.jpg", product_price: "211,30 €", product_shipping: "3,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(){ pmaWidgetInstance61516bb80067a2ef598c9e4a.initWidget("61516bb80067a2ef598c9e4a"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }