var pmaWidgetInstance5fcf8c3ad9685ed272f131e2 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=3c75ecafd3b5f60887685c48d32ba8ac:f3047f2e2b0ecaca03544645c79d3155f3c3aa2b31ba231331e2f6c9d9b3808fe45be1b50b9cefd98ec9887ceeb3330708bec09bfe67bf3a84f3242260c7c5cc5cc370e996445921516a03318d6133cd7105ba7bc7d46797968d931e79fcec5a91001ebe96e42e7b2e500eb02373db3ba0a4b638125ec7968d0feb9c8e838087334ce64b14bf7315bba9e971c28467dc99f8c2501a6605e6c7b4fb27d51f0f1394cfde87caae4348ab7222648d4ee124f337117440ab69df509fbe2dc41dba87", shop_name: "boukal.sk", shop_logo: "https://y1.sk/t/s/130x50/5806.jpg", product_price: "365,91 €", 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(){ pmaWidgetInstance5fcf8c3ad9685ed272f131e2.initWidget("5fcf8c3ad9685ed272f131e2"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }