Skip to content

Instantly share code, notes, and snippets.

@barleybobs
barleybobs / honeyDetection.js
Created January 1, 2025 21:42
JS to detect the Honey extensions popup on a checkout page
const honeyObserver = new MutationObserver((mutationsList) => {
for (const mutation of mutationsList) {
if (mutation.type === 'childList' && mutation.addedNodes.length > 0) {
for (const node of mutation.addedNodes) {
if (
node.nodeType === Node.ELEMENT_NODE &&
node.tagName === "DIV" &&
node.hasAttribute('data-reactroot') &&
node.innerHTML === "<link href=\"https://cdn.honey.io/css/honey-font.min.css?v2\" rel=\"stylesheet\">"
) {