Skip to content

Instantly share code, notes, and snippets.

View garretaserra's full-sized avatar
🕷️
Developing bugs

Sergi Garreta Serra garretaserra

🕷️
Developing bugs
  • Barcelona
View GitHub Profile
@garretaserra
garretaserra / mercadona-sync.js
Created October 11, 2025 15:10
Mercadona Sync
(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),