SHAPED BY HAND
THE ART OF TIME,
From openworking and the art of chiming watches to the subtle beauty of obsidian stone dials, the latest Code 11.59 by Audemars Piguet creations celebrate the expertise behind every detail.
—— LET US KNOW
THIS YEAR
WHAT WE SOURCED
—— VIEW ALL
function processProductDetail() {
if (!window.location.pathname.includes(
"/collectors-watches/p/"
)) return;
const root =
document.querySelector(".ProductItem-details") ||
document.querySelector("main") ||
document;
if (root.querySelector('[data-kcl-request="true"]')) return;
const elements = Array.from(
root.querySelectorAll(
".sqs-add-to-cart-button-wrapper, " +
".sqs-add-to-cart-button, " +
'[data-test*="add-to-cart"], ' +
"button, a, [role='button'], div"
)
);
const soldButton = elements.find(function (el) {
return /^sold(?:\s+out)?$/i.test(
el.textContent.replace(/\s+/g, " ").trim()
);
});
if (!soldButton) return;
const wrapper =
soldButton.closest(".sqs-add-to-cart-button-wrapper") ||
soldButton.closest(".sqs-add-to-cart-button") ||
soldButton;
const title = getTitle(root);
const requestButton = makeRequestButton(
title,
window.location.href
);
wrapper.replaceWith(requestButton);
}
// Ondersteunt ook navigatie binnen Squarespace
let scheduled = false;
const observer = new MutationObserver(function () {
if (scheduled) return;
scheduled = true;
requestAnimationFrame(function () {
scheduled = false;
run();
});
});
if (document.body) {
observer.observe(document.body, {
childList: true,
subtree: true
});
}
window.addEventListener("popstate", run);
})();