var pmaWidgetInstance5ff3fd15d9685ed272af6b34 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=02dbd70d1ab29477602c2a22a2d8db25:b194cbf53478b6bdbbe08b604b84e4c84f67b5a09bb590014fa00a470c2177bdf07563c7be43a571f094471ff49c987a224c2723094786d838c8693d163ce61099b8f8af1ee70dfe158c28e0019c0d15fa39897e36bfcaf8c056686513c392aea3bf5e99a821f80a16545112a672b6e10d80c026f61a089467e1c2c19fa4aa18480d6c29aa3f1bdfac12bad64eb0a114f4ac11f17767d57a3b06bc1873f93ee290e6e8e84bf806d7a1f56309cad658a3ae6843cd755038f7c90a227befce4c61", shop_name: "GalaxyMarket", shop_logo: "https://y1.sk/t/s/130x50/59525.jpg", product_price: "118,41 €", product_shipping: "3,50 €", 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(){ pmaWidgetInstance5ff3fd15d9685ed272af6b34.initWidget("5ff3fd15d9685ed272af6b34"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }