Last active
April 2, 2022 13:01
-
-
Save igolaizola/dba4dd0492e550ea7602b154621709dd to your computer and use it in GitHub Desktop.
Mercadona sync tool
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href='javascript:(function(){if (window.location.host == "tienda.mercadona.es") {c="";JSON.parse(localStorage.getItem("MO-cart")).lines.forEach(function(e) { c+="xc"+e.product_id+"a"+e.quantity+"ab"; });open("https://www.telecompra.mercadona.es/ns/principal.php?cart="+c);} else if (window.location.host == "www.telecompra.mercadona.es") {const params = new Proxy(new URLSearchParams(window.location.search), {get: (searchParams, prop) => searchParams.get(prop),}); document.cookie="cesta="+params.cart;location.reload();}})();'> | |
merca-sync | |
</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: (function() { | |
if (window.location.host == "tienda.mercadona.es") { | |
c = ""; | |
JSON.parse(localStorage.getItem("MO-cart")).lines.forEach(function(e) { | |
c += "xc" + e.product_id + "a" + e.quantity + "ab"; | |
}); | |
open("https://www.telecompra.mercadona.es/ns/principal.php?cart=" + c); | |
} else if (window.location.host == "www.telecompra.mercadona.es") { | |
const params = new Proxy(new URLSearchParams(window.location.search), { | |
get: (searchParams, prop) => searchParams.get(prop), | |
}); | |
document.cookie = "cesta=" + params.cart; | |
location.reload(); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment