@animuz/embed 0.2.2-rc4 → 0.2.2-rc6

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/dist/iframe.html CHANGED
@@ -25,7 +25,7 @@
25
25
  const params = getQueryParams();
26
26
  // Show error if embedId is not provided
27
27
  if (!params.embedId) {
28
- document.body.innerHTML = '<div style="color:red;font-family:sans-serif;padding:2em;text-align:center;">Error: <b>embedID</b> is required in the iframe URL query string.</div>';
28
+ document.body.innerHTML = '<div style="color:red;font-family:sans-serif;padding:2em;text-align:center;">Error: <b>embedId</b> is required in the iframe URL query string.</div>';
29
29
  } else {
30
30
  // Optionally, parse query params for config
31
31
  window.ANIMUZ_EMBED_CONFIG = {
@@ -35,9 +35,14 @@
35
35
  };
36
36
  var script = document.createElement('script');
37
37
  script.src = "animuz-chat-widget.min.js";
38
+ script.defer = true;
39
+ script.setAttribute('data-embed-id', params.embedId);
38
40
  document.body.appendChild(script);
39
41
  }
40
42
  </script>
43
+ <!-- <script src="animuz-chat-widget.min.js"></script> -->
44
+ <!-- <script defer data-embed-id="5df3b2f0-89db-11ef-bb7d-937ad4098825" src="animuz-chat-widget.js"> -->
45
+ </script>
41
46
  </body>
42
47
 
43
48
  </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@animuz/embed",
3
- "version": "0.2.2-rc4",
3
+ "version": "0.2.2-rc6",
4
4
  "description": "Embeddable chat widget for Rudi by Animuz",
5
5
  "type": "module",
6
6
  "main": "dist/animuz-chat-widget.min.js",