CINXE.COM
<!DOCTYPE html> <html lang="pl"> <head> <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1"> <meta charset="UTF-8"><script>/* <![CDATA[ */ ringDataLayer = {"context":{"variant":{"accelerator":"d2lkZ2V0cy5tb25ldGVhc3kucGw6Om1haW4tYzJhLXByb2QtdjItYXdzLXN0YXRz"},"id":{"website":"efa96d73-9714-43ce-8ef2-b5e9e66d5304"}}}; /* ]]> */</script><script>/* <![CDATA[ */ accConf = {"events":{"endpointPaths":["/a8f4d8cd95e164917035b64b867a45dd"]}}; /* ]]> */</script> </head> <body> <script class='moneteasy-widget-285921'>/* eslint-disable */ (function () { // https://businessinsider.com.pl/technologie/spieniacze-do-mleka-pyszna-kawa-jest-mozliwa-bez-ekspresu/f8d3vy1 var scripts = document.querySelectorAll('script[class^="moneteasy-widget-285921"]'); for (var i = 0; i < scripts.length; ++i) { var script = scripts[i]; var parent = script.parentNode; var iframe = document.createElement('iframe'); iframe.setAttribute('style', 'width:100%;margin:0;padding:0;border:none;'); iframe.setAttribute('scrolling', 'no'); iframe.setAttribute('data-ads-pos', i + 1); parent.insertBefore(iframe, script); var render = function () { iframe.contentWindow.document.open(); iframe.contentWindow.document.write('<!DOCTYPE html><html lang="pl"><head> <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1"> <meta charset="UTF-8"> </head> <body> <link rel="stylesheet" type="text/css" as="style" href="https://widgets.moneteasy.pl/3/widgets-styles.bundle.css"> <div class="widget-template product-single a1 has-signature" style="min-width: 150px; max-width: 280px;"> <div class="item item-product filled"> <a class="item-link" target="_blank" href="https://csr.onet.pl/1746213/trk/adclick/das,1651924,0?re=fdik&kvcustom_params=%5B%22widgetId%3D285921%22%2C%22campaignId%3D91753%22%2C%22sourceType%3Dwidget_gallery%22%2C%22foid%3D623699%22%2C%22did%3D15645%22%5D&URL=https%253A%252F%252Fwidgets.moneteasy.pl%252Fwidget-click%252Fpt2wXxdaWD3qKMMEYkoBA35jcNji163ItkS7%25252BZkEs2c9Y6UxLVMjcMknwiHfPGJd10K27%25252Bcpz1lqW9EQdSu4T%25252BdpvTA%25252Fw0XLUvJJq4sOTY8OAb88qoCKawFB%25252BOiSVYmU4qBO8prXk%25252BjepYZw8zWqxCdro133DSf0nqMqE9MOGSzhbINjaNU%25252FraQMVjjbQOmn2Fp9lFGa6so70Pnz3MBhKpzpSAzZnpUyKWO2CE0ON1vfe%25252F6xsWQF0h7SAXfzCtA8IVphPcuZ%25252BNSlyr%25252FaYutV%25252FLcItwcge2x5oW%25252BnDR3%25252BNJC%25252FWuthGzzNUAoJ2Lsz8zzhnApxHl4zbGDKe9qW4zy3G7PjaBFf4sJKMrGXkNbp6zFNd0mfj7GEjsB845x6L1E%25252FICNqHXq7xLt4bbXrbRDBg3mFOzsVRLOdLfr4%25252FhekiY0YKL%25252F80qw%25253D"> <div class="product-image filled"> <div class="img" style="background-image: url(\'https://ocdn.eu/moneteasy-transforms/1/MQ5kr53aWRnZXRfMjM2ODk5Mjg0MTE3MzAzNzI4MTA3MDaSlALNArwAwpQCAM0CvMI\')"></div> </div> <div class="product-details"> <div class="details-content"> <div class="name ">Spieniacz do mleka LAUBEN Milk Frother 550BC</div> <div class="product-rates d-none"> </div> </div> <div class="price-and-cta-container"> <div class="price-bar"> <div class="promo-price d-none"> </div> <div class="price d-none"> <span>od</span> 261 <sup>79</sup> <span>zł</span> </div> </div> <div class="cta "> <div class="btn">Sprawdź cenę</div> </div> </div> </div> </a> <a class="dsa d-none" href="undefined" target="_blank"> ⓘ </a> </div> <div class="widget-signature"><div class="signature-text">Materiały promocyjne</div></div> </div> <script>/* eslint-disable */ (function () { function addADPScript(lineItemIDs) { lineItemIDs = lineItemIDs || []; var chunkSize = 8; var adpUrl = \'https://ocdn.eu/adp/static/trk/latest/bundle.min.js#NT=1746213&ad_id=__LINEITEM_IDS__&ET=filled_emission\'; var customParams = \'&kvcustom_params=\' + encodeURIComponent(\'["widgetId=285921","campaignId=91753","sourceType=widget_gallery"]\'); for (var i = 0; i < lineItemIDs.length; i += chunkSize) { if (i < 1) { lineItemIDs[0] += encodeURIComponent(\'_composition=parent\'); } var lineItemIdsChunks = lineItemIDs.slice(i, i + chunkSize); var script = document.createElement(\'script\'); script.src = adpUrl.replace(\'__LINEITEM_IDS__\', lineItemIdsChunks.join(\'.\')) + customParams; document.head.appendChild(script); } } function appendTrackingParams() { var eEq = \'%253D\'; var eAmp = \'%2526\'; for (const aTag of document.body.getElementsByTagName(\'a\')) { const encodedParams = aTag.href.split(eAmp); if (!encodedParams[1]) { continue; } const searchParams = new URLSearchParams(aTag.href); encodedParams[1] = encodedParams[1] + [eAmp, \'IV\', eEq, searchParams.get(\'IV\'), eAmp, \'kvci\', eEq, searchParams.get(\'kvci\')].join(\'\'); const du = searchParams.get(\'du\'); if (du) { const duUrl = new URL(du); const duSearchParams = new URLSearchParams(duUrl.search); encodedParams[1] = encodedParams[1] + [eAmp, \'utm_aureus\', eEq, duSearchParams.get(\'utm_aureus\')].join(\'\'); } aTag.href = encodedParams.join(eAmp); } } addADPScript(["das,1651924,0"]); setTimeout(appendTrackingParams, 2e3); })(); <\/script> <script type="text/javascript">/* eslint-disable */ (function () { function updatePrice(doc, mainPrice, decimalPrice, currency) { if (!decimalPrice) { decimalPrice = \'00\'; } if (decimalPrice.length === 1) { decimalPrice = decimalPrice + \'0\'; } var priceContainer = doc.querySelector(\'.price\'); var mainPriceElement = priceContainer.childNodes[1]; var decimalPriceElement = priceContainer.querySelector(\'sup\'); var currencyElement = priceContainer.querySelector(\'span:last-child\'); mainPriceElement.textContent = ` ${mainPrice} `; decimalPriceElement.textContent = decimalPrice; currencyElement.textContent = currency; } function updateElementsBySelectors(elements, context) { for (var selector in elements) { if (elements.hasOwnProperty(selector)) { var doc = document; if (context) { doc = context; } const element = doc.querySelector(selector); if (element) { switch (selector) { case \'.product-image .img\': element.style.backgroundImage = \'url(\' + elements[selector] + \')\'; break; case \'a.item-link, a.item.item-product\': element.setAttribute(\'href\', elements[selector]); element.setAttribute(\'data-ads\', 1); break; case \'.old-price\': element.innerText = elements[selector]; if (!elements[selector]) { doc.querySelector(\'.promo-price\').innerHTML = \'\'; } break; case \'.price\': updatePrice(doc, elements[selector][0], elements[selector][1], elements[selector][2]); break; case \'.dsa\': if (!elements[selector]) { element.style.display = \'none\'; element.setAttribute(\'href\', \'#\'); break; } element.setAttribute(\'href\', elements[selector]); break; default: element.textContent = elements[selector]; break; } } else { console.warn(\'Element with selector \' + selector + \'not found in the provided document.\'); } } } } function overwriteWidget(types, ads, meta, currency) { function getFieldsMap(ad, currency) { var price = ad.offer_price.toString().split(\'.\'); var discount = ad.offer_old_price ? Math.round(((ad.offer_old_price - ad.offer_price) / ad.offer_old_price) * 100) : 0; return { \'a.item-link, a.item.item-product\': meta.adclick + (ad.offer_url || \'\'), \'.name\': ad.offer_name || \'\', \'.product-image .img\': ad.offer_image || \'\', \'.price\': [price[0], price[1], currency], \'.discount\': discount ? \'-\' + discount + \'%\' : \'\', \'.old-price\': ad.offer_old_price ? ad.offer_old_price : \'\', \'.dsa\': meta.dsaurl } } if (types.contains(\'product-single\')) { var ad = ads[0]; if (!ad) { return; } var fieldsMap = getFieldsMap(ad, currency); updateElementsBySelectors(fieldsMap, null); } if (types.contains(\'product-gallery\')) { var elements = document.querySelectorAll(\'.item.item-product\'); elements.forEach(function (elem, index) { var ad = ads[index]; if (ad) { var fieldsMap = getFieldsMap(ad, currency); updateElementsBySelectors(fieldsMap, elem); } }); } } function getCustomKvs(template) { var trkUrl = template.querySelector(\'a.item-link, a.item.item-product\'); var url = null; try { url = new URL(trkUrl); } catch (error) { console.error("Invalid URL:", error.message); return {}; } var customParamsString = null; if (url) { customParamsString = JSON.parse(url.searchParams.get(\'kvcustom_params\')); } var paramsOpts = {}; if (customParamsString) { var customParamsArray = customParamsString.map(param => param.split(\'=\')); paramsOpts = customParamsArray.reduce((acc, [key, value]) => { acc[`me_${key}`] = value; return acc; }, {}); } return paramsOpts; } function mergeAndDeduplicateOffers(fields) { var mergedOffers = {}; function getOffers(fields) { for (var key in fields) { if (fields.hasOwnProperty(key)) { const field = fields[key]; if (field && field.data && Array.isArray(field.data.offers)) { field.data.offers.forEach(offer => { if (!mergedOffers[offer.offer_id]) { mergedOffers[offer.offer_id] = offer; } }); } } } } getOffers(fields); return Object.values(mergedOffers); } function DlApi() { this.calls = {}; if (window.addEventListener) { window.addEventListener(\'message\', this.handle.bind(this), false); } else { window.attachEvent(\'onmessage\', this.handle.bind(this)); } } DlApi.prototype.handle = function (event) { var json; try { json = event.data; if (typeof json === \'string\') { json = JSON.parse(event.data); } } catch (e) { console.error(\'Error parsing JSON:\', e); return; } if (json && json.kind != \'__dlApiCall\') { var callback = this.calls[json.callId]; if (callback) { delete this.calls[json.callId]; callback(json.returnValue); } } }; DlApi.prototype.call = function (method, params, callback) { var callId = Math.random(); this.calls[callId] = callback; window.top.postMessage(JSON.stringify({ kind: \'__dlApiCall\', params: params, method: method, callId: callId }), \'*\'); }; function init() { var iframeElement = window.frameElement; var adsid = iframeElement.getAttribute(\'data-ads-pos\'); var template = document.querySelector(\'.widget-template\'); var paramsKvs = getCustomKvs(template); paramsKvs.pos = adsid; var params = { slot: \'measycc\', opts: paramsKvs, tplCode: \'1746213/Teaser-Offer\' }; var api = new DlApi(); api.call(\'fetchNativeAd\', params, function (ads) { if (!Object.prototype.hasOwnProperty.call(ads, \'fields\')) { return; } var feed = mergeAndDeduplicateOffers(ads.fields); if (!feed || !feed.length) { return; } var currency = ads.fields.dynamicfeed ? ads.fields.dynamicfeed.currency : (ads.fields.feed ? ads.fields.feed.currency : \'zł\'); overwriteWidget(template.classList, feed, ads.meta, currency); }); } init(); })();<\/script></body></html>'); iframe.contentWindow.document.close(); setTimeout(validate, 400); }; var validate = function () { if (iframe.contentWindow.document.querySelectorAll('div').length === 0) { console.log('ME_WGT: render retry'); render(); } else { var siteRef = ''; if (document.referrer || window.location.href) { if (window.location !== window.parent.location) { var url = document.referrer; } else { var url = document.location.href; } iframe.contentDocument.querySelectorAll('a:not(.dsa)').forEach(a => { if (a.hasAttribute('data-ads')) { return; } var character = '%253F'; var patt = new RegExp('%253F'); if (patt.test(a.href)) { character = '%2526'; } a.href += character + 'ref%253D' + encodeURI(encodeURIComponent(encodeURIComponent(url))); }); var searchParams = new URLSearchParams(iframe.contentDocument.querySelector('a').href); var iv = searchParams.get('IV'); if (iv) { iv = '&iv=' + iv; } else { iv = ''; } siteRef = 'ref=' + encodeURI(encodeURIComponent(url)) + iv; } new Image().src = 'https://widgets.moneteasy.pl/widget-view/285921?' + siteRef; } }; render(); var setHeight = function () { if (iframe.contentWindow.document.readyState === 'complete') { iframe.style.height = iframe.contentWindow.document.body.clientHeight + 'px'; return; } window.setTimeout(setHeight, 200); }; setHeight(); setInterval(function () { iframe.style.height = iframe.contentWindow.document.body.clientHeight + 'px'; }, 3000); parent.removeChild(script); } })(); </script> </body> </html>