var pmaWidgetInstance65f03f0fae16db346686011a = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=503db3c8b9f5a5766a66c88733401417:7da055741dc6732c9eea2ed2c9bad13b49591d8871f6e358c7db479df306482f38e6ecc855a79b95557a6a20158c173033a5fda1b62426ce7ffc245d5d0fbd4badcbf5581e8b787772d9f8b05b9d6419d9e69cbbe0c41b0fd2d1c2f03c3b4d55a81710f1905a876b1ff34fbe2eb0a33e074d54d5cfa06496678b48cdcc543f26a1f3fdecab6f53e29185ba8133c2c42c7aab7d2ed51427830da0aaebaea615951f5930c76f19c303af03de3ec814db243a2b7b6b6316be6bc2dae45cf4a01400acd863c016ec57dabd5d6dbe3a038ef6", shop_name: "lacne-nakupy.sk ", shop_logo: "https://y1.sk/t/s/130x50/6164.jpg", product_price: "311,00 €", product_shipping: "0,00 €", 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(){ pmaWidgetInstance65f03f0fae16db346686011a.initWidget("65f03f0fae16db346686011a"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }