fck-honey 0.1.4 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -7,7 +7,7 @@ Open source lib for Merchants to detect if an end user has Honey browser extensi
7
7
  ## Usage (Browser Global)
8
8
 
9
9
  ```html
10
- <script src="https://cdn.jsdelivr.net/npm/fck-honey"></script>
10
+ <script src="https://cdn.jsdelivr.net/npm/fck-honey/dist/honey-detect.min.js"></script>
11
11
  <script>
12
12
  window.fckHoney.listen((el) => {
13
13
  // Decide how you want to handle this.
package/dist/esm/index.js CHANGED
@@ -82,6 +82,7 @@ export function startHoneyOverlayObserver(options) {
82
82
  for (var _i = 0, mutations_1 = mutations; _i < mutations_1.length; _i++) {
83
83
  var m = mutations_1[_i];
84
84
  if (debug &&
85
+ document.body &&
85
86
  (m.target === document.body || (m.target instanceof Node && document.body.contains(m.target)))) {
86
87
  console.log("+++ body mutation", m.type, m.target);
87
88
  }
@@ -83,6 +83,7 @@ function startHoneyOverlayObserver(options) {
83
83
  for (var _i = 0, mutations_1 = mutations; _i < mutations_1.length; _i++) {
84
84
  var m = mutations_1[_i];
85
85
  if (debug &&
86
+ document.body &&
86
87
  (m.target === document.body || (m.target instanceof Node && document.body.contains(m.target)))) {
87
88
  console.log("+++ body mutation", m.type, m.target);
88
89
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fck-honey",
3
- "version": "0.1.4",
3
+ "version": "0.2.0",
4
4
  "description": "Detects Honey browser extension overlays for merchants.",
5
5
  "license": "MIT",
6
6
  "main": "dist/honey-detect.js",