var pmaWidgetInstance6051c214d9685ed27291c350 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=e9a119f10f4bce591887e92d0532fc5a:65dcc8693edc47c07fd516a4a64a02594caf020da4e18073a0b1a81eec3882527a221c58352882c99621d236671ff4f0f38010e48e9f7a08d4fec4f8a7b93cb9ff9f9ce798ce36cd869437ec514781e0d95a02391860588a5a09e3d2e6c0bffeedb9f79a6ca971e5edb9b92dde3a42f9188f43672002f7bc4eb77b078f73b081a94c74e168a9eacc9a05b8272b95206f824a4d4708fcef3457c39be784f6ef0bfd92e5a70c5ac516a0949d7e5cd1a22dc6c1414ef18d0243d75d0d1e31ae6fb3", shop_name: "pneunaj.com", shop_logo: "https://y1.sk/t/s/130x50/52071.jpg", product_price: "96,61 €", product_shipping: "", product_availability: "Skladom", 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(){ pmaWidgetInstance6051c214d9685ed27291c350.initWidget("6051c214d9685ed27291c350"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }