Diff
checker
Texte
Texte
Images
Documents
Excel
Dossiers
Legal
Enterprise
Application de bureau
Prix
Se connecter
Télécharger Diffchecker Desktop
Comparer le texte
Trouver la différence entre deux fichiers texte
Outils
Historique
Éditeur live
Cacher identiques
Sans retour à la ligne
Vue
Divisé
Unifié
Niveau de précision
Intelligent
Mot
Caractère
Coloration syntaxique
Choisir la syntaxe
Ignorer
Transformer le texte
Aller au premier écart
Modifier l'entrée
Diffchecker Desktop
La façon la plus sécurisée d'utiliser Diffchecker. Obtenez l'application Diffchecker Desktop : vos diffs ne quittent jamais votre ordinateur !
Obtenir Desktop
cookies.phtml
Créé
il y a 3 ans
Le diff n'expire jamais
Effacer
Exporter
Partager
Expliquer
1 suppression
Lignes
Total
Supprimé
Caractères
Total
Supprimé
Pour continuer à utiliser cette fonctionnalité, passez à
Diff
checker
Pro
Voir les prix
75 lignes
Copier tout
1 ajout
Lignes
Total
Ajouté
Caractères
Total
Ajouté
Pour continuer à utiliser cette fonctionnalité, passez à
Diff
checker
Pro
Voir les prix
75 lignes
Copier tout
<?php
<?php
/**
/**
* Hyvä Themes - https://hyva.io
* Hyvä Themes - https://hyva.io
* Copyright © Hyvä Themes 2020-present. All rights reserved.
* Copyright © Hyvä Themes 2020-present. All rights reserved.
* This product is licensed per Magento install
* This product is licensed per Magento install
* See https://hyva.io/license
* See https://hyva.io/license
*/
*/
declare(strict_types=1);
declare(strict_types=1);
/** @var \Magento\Framework\View\Element\Template $block */
/** @var \Magento\Framework\View\Element\Template $block */
?>
?>
<script>
<script>
'use strict';
'use strict';
function dispatchMessages(messages, hideAfter) {
function dispatchMessages(messages, hideAfter) {
const messagesEvent = new CustomEvent("messages-loaded", {
const messagesEvent = new CustomEvent("messages-loaded", {
detail: {
detail: {
messages: messages,
messages: messages,
hideAfter: hideAfter
hideAfter: hideAfter
}
}
});
});
window.dispatchEvent(messagesEvent);
window.dispatchEvent(messagesEvent);
}
}
<?php
<?php
/**
/**
* The `hyva` JS namespace is being set by Hyva_Theme/src/view/frontend/templates/page/js/hyva.phtml
* The `hyva` JS namespace is being set by Hyva_Theme/src/view/frontend/templates/page/js/hyva.phtml
* and should be included through Hyva_Theme/src/view/frontend/layout/default_hyva.xml
* and should be included through Hyva_Theme/src/view/frontend/layout/default_hyva.xml
*/
*/
?>
?>
if (typeof hyva === 'undefined' || (!hyva.getBrowserStorage || !hyva.getCookie || !hyva.setCookie)) {
if (typeof hyva === 'undefined' || (!hyva.getBrowserStorage || !hyva.getCookie || !hyva.setCookie)) {
console.warn("Hyvä helpers are not loaded yet. Make sure they are included before this script");
console.warn("Hyvä helpers are not loaded yet. Make sure they are included before this script");
}
}
(function( hyva, undefined ) {
(function( hyva, undefined ) {
hyva.initFormKey = () => {
hyva.initFormKey = () => {
const inputSelector = 'input[name="form_key"]',
const inputSelector = 'input[name="form_key"]',
formKey = hyva.getFormKey();
formKey = hyva.getFormKey();
Array.from(document.querySelectorAll(inputSelector)).map(function (input) {
Array.from(document.querySelectorAll(inputSelector)).map(function (input) {
input.value = formKey
input.value = formKey
});
});
}
}
hyva.initMessages = () => {
hyva.initMessages = () => {
try {
try {
const messages = hyva.getCookie('mage-messages');
const messages = hyva.getCookie('mage-messages');
window.mageMessages = messages ? JSON.parse(decodeURIComponent(messages).replace(/\+/g, ' ')) : [];
window.mageMessages = messages ? JSON.parse(decodeURIComponent(messages).replace(/\+/g, ' ')) : [];
dispatchMessages(window.mageMessages);
dispatchMessages(window.mageMessages);
<?php
<?php
/**
/**
* In \Magento\Theme\Controller\Result\MessagePlugin::setCookie
* In \Magento\Theme\Controller\Result\MessagePlugin::setCookie
* the cookie-domain is not set. Therefore, we need to skip it
* the cookie-domain is not set. Therefore, we need to skip it
* here as well.
* here as well.
*/
*/
?>
?>
// empty `mage-messages` cookie
// empty `mage-messages` cookie
const skipSetDomain = true;
const skipSetDomain = true;
hyva.setCookie('mage-messages','', -1, skipSetDomain);
hyva.setCookie('mage-messages','', -1, skipSetDomain);
} catch (error) {
} catch (error) {
console.warn('Error parsing Cookie Messages:', error);
console.warn('Error parsing Cookie Messages:', error);
}
}
}
}
window.addEventListener('DOMContentLoaded', hyva.initFormKey);
window.addEventListener('DOMContentLoaded', hyva.initFormKey);
Copier
Copié
Copier
Copié
window.addEventListener('
load
', hyva.initMessages);
window.addEventListener('
alpine:initialized
', hyva.initMessages);
}( window.hyva = window.hyva || {} ));
}( window.hyva = window.hyva || {} ));
</script>
</script>
Différences enregistrées
Texte d'origine
Ouvrir un fichier
<?php /** * Hyvä Themes - https://hyva.io * Copyright © Hyvä Themes 2020-present. All rights reserved. * This product is licensed per Magento install * See https://hyva.io/license */ declare(strict_types=1); /** @var \Magento\Framework\View\Element\Template $block */ ?> <script> 'use strict'; function dispatchMessages(messages, hideAfter) { const messagesEvent = new CustomEvent("messages-loaded", { detail: { messages: messages, hideAfter: hideAfter } }); window.dispatchEvent(messagesEvent); } <?php /** * The `hyva` JS namespace is being set by Hyva_Theme/src/view/frontend/templates/page/js/hyva.phtml * and should be included through Hyva_Theme/src/view/frontend/layout/default_hyva.xml */ ?> if (typeof hyva === 'undefined' || (!hyva.getBrowserStorage || !hyva.getCookie || !hyva.setCookie)) { console.warn("Hyvä helpers are not loaded yet. Make sure they are included before this script"); } (function( hyva, undefined ) { hyva.initFormKey = () => { const inputSelector = 'input[name="form_key"]', formKey = hyva.getFormKey(); Array.from(document.querySelectorAll(inputSelector)).map(function (input) { input.value = formKey }); } hyva.initMessages = () => { try { const messages = hyva.getCookie('mage-messages'); window.mageMessages = messages ? JSON.parse(decodeURIComponent(messages).replace(/\+/g, ' ')) : []; dispatchMessages(window.mageMessages); <?php /** * In \Magento\Theme\Controller\Result\MessagePlugin::setCookie * the cookie-domain is not set. Therefore, we need to skip it * here as well. */ ?> // empty `mage-messages` cookie const skipSetDomain = true; hyva.setCookie('mage-messages','', -1, skipSetDomain); } catch (error) { console.warn('Error parsing Cookie Messages:', error); } } window.addEventListener('DOMContentLoaded', hyva.initFormKey); window.addEventListener('load', hyva.initMessages); }( window.hyva = window.hyva || {} )); </script>
Texte modifié
Ouvrir un fichier
<?php /** * Hyvä Themes - https://hyva.io * Copyright © Hyvä Themes 2020-present. All rights reserved. * This product is licensed per Magento install * See https://hyva.io/license */ declare(strict_types=1); /** @var \Magento\Framework\View\Element\Template $block */ ?> <script> 'use strict'; function dispatchMessages(messages, hideAfter) { const messagesEvent = new CustomEvent("messages-loaded", { detail: { messages: messages, hideAfter: hideAfter } }); window.dispatchEvent(messagesEvent); } <?php /** * The `hyva` JS namespace is being set by Hyva_Theme/src/view/frontend/templates/page/js/hyva.phtml * and should be included through Hyva_Theme/src/view/frontend/layout/default_hyva.xml */ ?> if (typeof hyva === 'undefined' || (!hyva.getBrowserStorage || !hyva.getCookie || !hyva.setCookie)) { console.warn("Hyvä helpers are not loaded yet. Make sure they are included before this script"); } (function( hyva, undefined ) { hyva.initFormKey = () => { const inputSelector = 'input[name="form_key"]', formKey = hyva.getFormKey(); Array.from(document.querySelectorAll(inputSelector)).map(function (input) { input.value = formKey }); } hyva.initMessages = () => { try { const messages = hyva.getCookie('mage-messages'); window.mageMessages = messages ? JSON.parse(decodeURIComponent(messages).replace(/\+/g, ' ')) : []; dispatchMessages(window.mageMessages); <?php /** * In \Magento\Theme\Controller\Result\MessagePlugin::setCookie * the cookie-domain is not set. Therefore, we need to skip it * here as well. */ ?> // empty `mage-messages` cookie const skipSetDomain = true; hyva.setCookie('mage-messages','', -1, skipSetDomain); } catch (error) { console.warn('Error parsing Cookie Messages:', error); } } window.addEventListener('DOMContentLoaded', hyva.initFormKey); window.addEventListener('alpine:initialized', hyva.initMessages); }( window.hyva = window.hyva || {} )); </script>
Trouver la différence