@kokimoki/app 1.4.1 → 1.4.2

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.
@@ -54,11 +54,17 @@ export class KokimokiClient extends EventEmitter {
54
54
  }
55
55
  }, 5000);
56
56
  // Detect devtools
57
+ console.log(`[KM]`, window.top, frameElement?.id);
57
58
  if (window.top && frameElement) {
58
59
  this._clientTokenKey = `KM_TOKEN/${frameElement.id}`;
59
60
  window.addEventListener("message", (e) => {
61
+ console.log(`[KM ${frameElement?.id}] ${e.data}`);
60
62
  if (e.data === "km:clearStorage") {
61
63
  localStorage.removeItem(this._clientTokenKey);
64
+ window.location.reload();
65
+ }
66
+ else if (e.data === "km:reload") {
67
+ window.location.reload();
62
68
  }
63
69
  });
64
70
  }
@@ -634,7 +634,7 @@ function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
634
634
  var eventsExports = events.exports;
635
635
  var EventEmitter$1 = /*@__PURE__*/getDefaultExportFromCjs(eventsExports);
636
636
 
637
- const KOKIMOKI_APP_VERSION = "1.4.1";
637
+ const KOKIMOKI_APP_VERSION = "1.4.2";
638
638
 
639
639
  /**
640
640
  * Utility module to work with key-value stores.
@@ -12267,11 +12267,17 @@ class KokimokiClient extends EventEmitter$1 {
12267
12267
  }
12268
12268
  }, 5000);
12269
12269
  // Detect devtools
12270
+ console.log(`[KM]`, window.top, frameElement?.id);
12270
12271
  if (window.top && frameElement) {
12271
12272
  this._clientTokenKey = `KM_TOKEN/${frameElement.id}`;
12272
12273
  window.addEventListener("message", (e) => {
12274
+ console.log(`[KM ${frameElement?.id}] ${e.data}`);
12273
12275
  if (e.data === "km:clearStorage") {
12274
12276
  localStorage.removeItem(this._clientTokenKey);
12277
+ window.location.reload();
12278
+ }
12279
+ else if (e.data === "km:reload") {
12280
+ window.location.reload();
12275
12281
  }
12276
12282
  });
12277
12283
  }