![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/cartforge.co/pub/static/frontend/Magento/luma/en_US/Magento_Cookie/js/ |
/** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ /** * @api */ define([ 'jquery', 'jquery-ui-modules/widget', 'mage/cookies' ], function ($) { 'use strict'; $.widget('mage.cookieNotices', { /** @inheritdoc */ _create: function () { if ($.mage.cookies.get(this.options.cookieName)) { this.element.hide(); } else { this.element.show(); } $(this.options.cookieAllowButtonSelector).on('click', $.proxy(function () { var cookieExpires = new Date(new Date().getTime() + this.options.cookieLifetime * 1000); $.mage.cookies.set(this.options.cookieName, JSON.stringify(this.options.cookieValue), { expires: cookieExpires }); if ($.mage.cookies.get(this.options.cookieName)) { this.element.hide(); $(document).trigger('user:allowed:save:cookie'); } else { window.location.href = this.options.noCookiesUrl; } }, this)); } }); return $.mage.cookieNotices; });