コーヒーメーカー&カプセルコーヒーのネスプレッソ【公式】

`; $('body').append(output); } // Returns formatted contents for triggering popup when clicked function generatePopupTriggerContent(popup_id, content, tracking_id = '') { return `` + content + ``; } // Set universal popup trigger listeners (regardless of declaration timing) $('body').on('click', '.popup-trigger-news', function() { var sel = $(this).attr('data-popup-target-news'); $('#' + sel).show(); }); $('body').on('click', '.popup', function() { // Set popup hide trigger (dark background click) e.stopPropagation(); $(this).hide(); }); $('body').on('click', '.popup-btn-close', function() { $('.popup').hide(); }); // Move a given component (based on ID) below the main product section (above the PDP contents) // Call this function AFTER target component function moveComponentToTop_PDP(id) { var displayBestSeller_PDP = false; var target_id = "#" + id; // Once page ready, set recurring check for PDP component anchors to reposition target (needs to run continuously to catch resolution change visual resets) $(document).ready(function () { $(target_id).eq(0).hide(); window.moveComponentToTop_PDP_checkLoaded = setInterval(function() { if ($('.ProductDetailsAttributes').length != 0 || $('nb-pdp').length != 0) { if ($('.ProductDetailsAttributes').length != 0) { // Non-PB if ($('.ProductDetailsAttributes ' + target_id).length == 0) { $(target_id).appendTo($('.ProductDetailsAttributes').eq(0)); } } else if ($('nb-pdp').length != 0) { // PB if ($('nb-pdp ' + target_id).length == 0) { $(target_id).appendTo($('nb-pdp').eq(0)); } } if (!displayBestSeller_PDP) { $(target_id).eq(0).show(); displayBestSeller_PDP = true; } } }, 1000); }); } // Set top menu entry style override for desktop function setHeaderContentOverride(target_index, font_size, base_color = '#1B1B1B', font_color = '#D5D5D5') { var output = '@media screen and (min-width: 996px) {' + 'ul.HeaderNavigationBar__menu>li:nth-child(' + (target_index + 1) + ')' + '{' + 'font-size: ' + font_size + ';' + 'color: ' + font_color + ';' + 'background-color: ' + base_color + ';' + '}' + 'ul.HeaderNavigationBar__menu>li:nth-child(' + (target_index + 1) + '):hover { background-color: #FFFFFF; }' + '}' + '@media screen and (max-width: 995px) {' + 'ul.HeaderNavigationBar__menu>li:nth-child(' + (target_index + 2) + ')' + '{' + 'color: ' + font_color + ';' + 'background-color: ' + base_color + ';' + '}' + '}'; $('#css_header_overrides').append(output); } //Set a persisting sticky icon on the page function setStickyIcon(id, icon_url, popup_header, popup_contents, backgroundColor = 'unset', width = '70px', height = '70px', closeButton_marginLeft = '65px') { var output = "
" + "
×
" + "" + "
" + "
" + "
"; $('body').append(output); $('body').on('click', '.stickyIcon_closeButton', function() { $('.stickyIcon_main').remove(); }); setBannerPopup_NewsPopupBanner(id, popup_header, popup_contents); } // Run recurring check for Custom A2C buttons manually function checkForCustomA2C() { window.checkPage_invokeCustomA2C_buttons = setInterval(function() { if ($('add-to-bag').eq(0).html.length != 0 || $('add-to-bag').length == 0) { clearInterval(checkPage_invokeCustomA2C_buttons); } mosaic.initializeAllFreeHTMLModules(document.getElementById('main')); }, 1000); } // Set price crossout on products // FORMAT: [{ sku: "YOUR-SKU", price_new: 1000 }, { sku: "YOUR-SKU2", price_new: 2000 }, ] function setDiscountValue(value_set) { var price_original = false; var price_new = false; for (var i = 0; i < value_set.length; i++) { // Check PLP.or PDP based on presence of unique components if ((typeof $('[data-product-code='+value_set[i].sku+'] .ProductListElement__price').html() !== 'undefined') && $('[data-product-code='+value_set[i].sku+'] .ProductListElement__price').html().length) { price_original = "¥" + value_set[i].price_original.toLocaleString() + " "; price_new = "¥" + value_set[i].price_new.toLocaleString(); $('[data-product-code='+value_set[i].sku+'] .ProductListElement__price').html(price_original + price_new); } else if (checkPDP_matchingSKU(value_set[i].sku)) { price_original = " ¥" + value_set[i].price_original.toLocaleString() + ""; price_new = "¥" + value_set[i].price_new.toLocaleString(); $('.ProductDetails__price').html(price_new + price_original); } } } // Returns boolean to check if PDP matches with a given SKU // Note: Only works after page is in ready state function checkPDP_matchingSKU(sku) { if ((typeof $('[id^="ProductDetail__erp"]').attr('id') !== 'undefined') && ($('[id^="ProductDetail__erp"]').attr('id').slice(31, 100) == sku)) { return true; } return false; } // Reads the product page's SKU based on the settings in the A2C button (used for non-NEXTV1 pages) function getProductSKU_fromA2C_NonNEXTV1() { var pdp_sku = $('#ta-product-details__add-to-bag-button').attr('data-qa'); if (typeof pdp_sku != 'undefined') { return pdp_sku; } return false; } // Function for preloading a batch of img files function preloadImages(url_list) { for (var i = 0; i < url_list.length; i++) { $("").attr("src", url_list[i]).appendTo('body'); } } function getTopDisplacementValue() { var val_hp_h1_visible = $("#hp_h1_visible").css("padding-top") ?? 0; // Home page Title Banner var output = 0; // Resolution calculation determined by viewport // Latest version only needs to run when resolution < 995 (i.e. tablet/desktop) if ($(window).width() <= 995) { // Tablet/Mobile resolution if ($(".Header__top-wrapper").height() == null) { output = 10; } else { output = ($(".Header__top-wrapper").height() != null ? $(".Header__top-wrapper").height() : 100) - $("#header").height(); } } return output; } // Removes PLP banner for wrong technology function removePLPBanner() { // Check if OL or VL based on link var pageTechnology = false; if ((window.location.href.indexOf('/order/machines/original') > -1) || (window.location.href.indexOf('/order/capsules/original') > -1) || (window.location.href.indexOf('/order/accessories/original') > -1)) { pageTechnology = "OL"; } else if ((window.location.href.indexOf('/order/machines/vertuo') > -1) || (window.location.href.indexOf('/order/capsules/vertuo') > -1) || (window.location.href.indexOf('/order/accessories/vertuo') > -1)) { pageTechnology = "VL"; } // Check what type of PLP var pageType = false; if (window.location.href.indexOf('/machines/') > -1) { pageType = "Machines"; } else if (window.location.href.indexOf('/capsules/') > -1) { pageType = "Capsules"; } else if (window.location.href.indexOf('/accessories/') > -1) { pageType = "Accessories"; } // If both conditions non-false, run CSS override insert if (pageTechnology && pageType) { var output = ""; if (pageTechnology == "OL") { output = 'div[id^=respPromotionBannersBlock-' + pageType + '-Original-PLP] { display: block; }'; } else if (pageTechnology == "VL") { output = 'div[id^=respPromotionBannersBlock-' + pageType + '-Vertuo-PLP] { display: block; }'; } $('#css_plp_showBanner').append(output); } } function changeBannerBackdropColor() { window.checkBannerColorFiller = setInterval(function() { var bannerIndex = (window.location.href.indexOf("vertuo") > -1) ? 1 : 0; var targetBanner = $('.ResponsiveImage--flexible').eq(bannerIndex); // Check if responsive banners found on page if (typeof targetBanner != "undefined") { // Set canvas to render image from banner var myImg = new Image(); // Determine Technology of Current Page (to set correct banner to read) var bannerImage_source = targetBanner.attr("src"); if (bannerImage_source.length != 0) { var cutoffIndex = bannerImage_source.indexOf("?"); myImg.src = bannerImage_source.substring(0, cutoffIndex); // Execute once image loaded from target myImg.onload = () => { // Create limited-size canvas to draw color samples from image var context = document.createElement('canvas').getContext('2d'); context.drawImage(myImg, 0, 0, 300, 10); // Determine left and right side background colors using left and right-most color values var {data} = context.getImageData(0, 5, 1, 1); var color_l = data[0] + "," + data[1] + "," + data[2]; var {data} = context.getImageData(299, 5, 1, 1); var color_r = data[0] + "," + data[1] + "," + data[2]; // console.log("color_l: " + color_l); // console.log("color_r: " + color_r); // Execute only if both colors are not white if (color_l != "255,255,255" && color_r != "255,255,255") { // Set background color override var linearGradient_css = "linear-gradient(90deg, rgb(" + color_l + ") 50%, rgb(" + color_r + ") 50%)"; targetBanner.parents('.PromotionBanner').css('background', linearGradient_css); } } } } }, 1000); } // Set height displacement of main content wrapper depending on delivery banner text height function setMainDisplacement() { var target_value = getTopDisplacementValue(); $("#main").css('margin-top', target_value); } // Add event label markets to menu items // Index of Mobile Menu Position = Desktop + 1 function setMenuEventMarker(position_desktop, mobileDisplay_label_en = "EVENT", mobileDisplay_label_ja = "イベント中") { var output_mobileLabel = outputTextByLang(mobileDisplay_label_en, mobileDisplay_label_ja); var output = '@media screen and (min-width: 996px) { .HeaderNavigationBarItem:nth-child(' + position_desktop + ')::after { content: ""; color: #FFFFFF; padding: 0; font-weight: bold; background-color: #986f38; width: 10px; height: 10px; border-radius: 50%; margin-left: 90px; position: absolute; top: 5px; } } @media screen and (max-width: 995px) { .HeaderNavigationBarItem:nth-child(' + (position_desktop + 1) + ')::after { content: "' + output_mobileLabel + '"; color: #FFFFFF; padding: 2px 5px; font-weight: bold; background-color: #986f38; border-radius: 3px; width: fit-content; height: 20px; position: absolute; display: block; margin-top: -36px; margin-left: 150px; } }'; $('#menuEventMarkers').append(output); } // Read a page's GET URL variables and return them as an associative array // Usage Example: getUrlVars()['VARIABLE HERE'] function getUrlVars() { var vars = [], hash; var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); for(var i = 0; i < hashes.length; i++) { hash = hashes[i].split('='); vars.push(hash[0]); vars[hash[0]] = hash[1]; } return vars; } // Display custom event banner (compact version of PB Banner for Home) function setCustomEventBanner(id, title_en, title_ja, subtitle_en, subtitle_ja, popup_header_en, popup_header_ja, popup_contents_en, popup_contents_ja) { var outputs = { title: outputTextByLang(title_en, title_ja), subtitle: outputTextByLang(subtitle_en, subtitle_ja), popup_header: outputTextByLang(popup_header_en, popup_header_ja), popup_contents: outputTextByLang(popup_contents_en, popup_contents_ja), }; setBannerPopup_NewsPopupBanner(id, outputs.popup_header, outputs.popup_contents); var output = `
` + `
` + outputs.title + `
` + outputs.subtitle + `
`; document.write(output); } // Extract query strings from URL function getUrlVars() { var vars = [], hash; var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); for(var i = 0; i < hashes.length; i++) { hash = hashes[i].split('='); vars.push(hash[0]); vars[hash[0]] = hash[1]; } return vars; } // Copy given contents to clipboard function copyPromoCode(contents) { navigator.clipboard.writeText(contents); var label_codeCopied = outputTextByLang('Promo Code copied: ', 'プロモコードをコピーしました:') + '
' + '
' + contents + '
'; copyContent_showPopup(label_codeCopied); } // Show popup which fades after a given number of miliseconds function copyContent_showPopup(contents, showDuration = 3000) { // Check if popup entry already exists if ($('#copyPopup').length != 0) { // Refresh visibility of existing popup $('#copyPopup').fadeIn(0); } else { // Create new popup instance $('body').prepend(`
` + contents + `
`); } $("#copyPopup").delay(showDuration).fadeOut(500); } $(document).ready(function () { checkForCustomA2C(); }); $(window).on('load', function() { setMainDisplacement(); }); // function set30Command () { // if (window.addEventListener) { // var keys = [], // kCommand = "38,38,40,40,37,39,37,39,66,65"; // window.addEventListener("keydown", function(e) { // keys.push(e.keyCode); // // Run once key inputs fully match the kCommand array entries // if (keys.toString().indexOf(kCommand) >= 0) { // keys = []; // Reset input keys // }; // }, true); // } // };
"; } else { inputValue_isBlank = dynamicTextBanner_contents[i].url_toNewTab == true ? "_blank" : "_self"; var html_linkStart = (url_popup_contents != false) ? `` : ''; var html_linkEnd = (url_popup_contents != false) ? '' : ''; inputValue_temp = `
` + html_linkStart + ` ` + newsText_desktop + ` ` + newsText_mobile + ` ` + html_linkEnd + `
`; } dynamicBanner_entries += inputValue_temp; } // Set slideshow speed values $('#slideshow').eq(0).append(dynamicBanner_entries); $("#slideshow > div:gt(0)").hide(); // Enable switching of news entries only if there are two or more items // Otherwise, hide arrows if (dynamicTextBanner_contents.length > 1) { setInterval(function() { $('#slideshow > div:first') .fadeOut(dynamicBannerProperties.fadeOutSpeed).next() .fadeIn(dynamicBannerProperties.fadeInSpeed).end() .appendTo('#slideshow'); }, dynamicBannerProperties.durationPerEntry); } else { $('.navi_desktop').hide(); $('.navi_mobile').hide(); } // Navigation buttons for text banner entries function dynamicBannerButton_prev() { if (dynamicTextBanner_contents.length > 1) { $('#slideshow > div:first').fadeOut(dynamicBannerProperties.fadeOutSpeed).end(); $('#slideshow > div:last').fadeIn(dynamicBannerProperties.fadeInSpeed).prependTo('#slideshow'); } tracking_ga4('dynamic_text_banner', 'button - prev', null, event_value = 1); } function dynamicBannerButton_next() { if (dynamicTextBanner_contents.length > 1) { $('#slideshow > div:first').fadeOut(dynamicBannerProperties.fadeOutSpeed).next().fadeIn(dynamicBannerProperties.fadeInSpeed).end().appendTo('#slideshow'); } tracking_ga4('dynamic_text_banner', 'button - next', null, event_value = 1); } $(window).resize(function() { setMainDisplacement(); }); // Set height calculation refresh at regular interval $(document).ready(function() { setInterval(function() { // Calculate & set for Desktop navigation bar if ($(window).width() > 995) { if ($('#header .Header').hasClass('Header__inline')) { $('#header .Header').removeClass('Header__inline'); } var header_height = $(".Header__top-wrapper").height() + 5; // console.log("Header Height: " + header_height); $(".HeaderNavigationBar__nav").css('margin-top', header_height); } }, 1000); });
Nespresso

Nespresso Original Capsule

カプセルコーヒー&コーヒーメーカーのネスプレッソ

申し訳ございません。お使いのブラウザのバージョンでは、正しく動作しない可能性があります。

了解しました。