fck-honey
v0.3.10
Published
Detects Honey browser extension overlays for merchants.
Downloads
2,068
Readme
fck-honey
Open source lib for Merchants to detect if a customer has Honey browser extension installed [ Demo 🎥 ]
Easy install (no-JS)
This will automatically listen for Honey and show a default warning to the user to disable the extension as shown above). Install this at the very top of the <head> in your webpage to ensure it runs prior to Honey.
<script src="https://cdn.jsdelivr.net/npm/fck-honey@latest/dist/auto.min.js"></script>Custom Usage (Browser Global)
<script src="https://cdn.jsdelivr.net/npm/fck-honey@latest/dist/honey-detect.min.js"></script>
<script>
window.fckHoney.listen((warn, el, vendor) => {
// Decide how you want to handle this. Native warn function allows you to tell the user to disable Honey.
// vendor is "honey", "Capital One Shopping", or "Rakuten"
warn("You must disable the Honey extension to continue.");
});
</script>Custom Usage (ESM)
npm install fck-honeyimport { listen } from "fck-honey";
listen((warn, el, vendor) => {
// Decide how you want to handle this. Native warn function allows you to tell the user to disable Honey.
// vendor is "honey", "Capital One Shopping", or "Rakuten"
warn("You must disable the Honey extension to continue.");
});Advanced Options
window.fckHoney.listen((warn, el, vendor) => {
// removeHoney defaults to true (element is auto-removed).
// Set removeHoney to false if you want to keep the Honey element for some reason.
// vendor is "honey", "Capital One Shopping", or "Rakuten"
}, { removeHoney: false });window.fckHoney.listen((warn) => {
// Stop observing if nothing is detected within 10 seconds.
}, { unbindAfterSeconds: 10 });