web-manager 3.1.27 → 3.1.28

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.
Files changed (2) hide show
  1. package/index.js +9 -19
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -30,6 +30,7 @@ var debug;
30
30
 
31
31
  // Shortcuts
32
32
  var select;
33
+ var loadScript;
33
34
 
34
35
 
35
36
  /**
@@ -154,7 +155,7 @@ function Manager() {
154
155
  }
155
156
 
156
157
  select = this.dom().select;
157
-
158
+ loadScript = this.dom().loadScript;
158
159
  }
159
160
 
160
161
  /**
@@ -330,8 +331,9 @@ function Manager() {
330
331
  window.location.href = sendSplit[0] + '?' + newQuery.toString();
331
332
  return;
332
333
  }
333
- This.dom().select('.auth-signedin-true-element').hide();
334
- This.dom().select('.auth-signedin-false-element').show();
334
+
335
+ select('.auth-signedin-true-element').hide();
336
+ select('.auth-signedin-false-element').show();
335
337
  }
336
338
 
337
339
  Manager.prototype.ready = function(fn, options) {
@@ -1426,22 +1428,13 @@ function Manager() {
1426
1428
  }
1427
1429
 
1428
1430
  var load_chatsy = function(This, options) {
1429
- var dom = This.dom();
1430
-
1431
1431
  return new Promise(function(resolve, reject) {
1432
1432
  if (options.libraries.chatsy.enabled === true) {
1433
1433
  var chatsyPath = 'libraries.chatsy.config';
1434
1434
 
1435
- // function log() {
1436
- // console.log('---chatsy', chatsy.open, chatsy.status);
1437
- // }
1438
- // setInterval(function () {
1439
- // log()
1440
- // }, 1000);
1441
-
1442
- dom.loadScript({
1443
- // src: 'https://app.chatsy.ai/resources/script.js',
1444
- src: 'http://localhost:4001/resources/script.js',
1435
+ loadScript({
1436
+ src: 'https://app.chatsy.ai/resources/script.js',
1437
+ // src: 'http://localhost:4001/resources/script.js',
1445
1438
  attributes: [
1446
1439
  {name: 'data-account-id', value: utilities.get(options, chatsyPath + '.accountId', '')},
1447
1440
  {name: 'data-chat-id', value: utilities.get(options, chatsyPath + '.chatId', '')},
@@ -1472,9 +1465,6 @@ function Manager() {
1472
1465
 
1473
1466
  var load_sentry = function(This, options) {
1474
1467
  return new Promise(function(resolve, reject) {
1475
- // if (typeof window.Sentry !== 'undefined') {
1476
- // return resolve();
1477
- // }
1478
1468
  if (options.libraries.sentry.enabled === true) {
1479
1469
  import('@sentry/browser')
1480
1470
  .then(function(mod) {
@@ -1538,7 +1528,7 @@ function Manager() {
1538
1528
  if (featuresDefault && featuresCustom) {
1539
1529
  cb();
1540
1530
  } else {
1541
- This.dom().loadScript({src: 'https://polyfill.io/v3/polyfill.min.js?flags=always%2Cgated&features=default%2Ces5%2Ces6%2Ces7%2CPromise.prototype.finally%2C%7Ehtml5-elements%2ClocalStorage%2Cfetch%2CURLSearchParams'})
1531
+ loadScript({src: 'https://polyfill.io/v3/polyfill.min.js?flags=always%2Cgated&features=default%2Ces5%2Ces6%2Ces7%2CPromise.prototype.finally%2C%7Ehtml5-elements%2ClocalStorage%2Cfetch%2CURLSearchParams'})
1542
1532
  .then(function() {
1543
1533
  // This.log('Loaded polyfill.io')
1544
1534
  cb();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-manager",
3
- "version": "3.1.27",
3
+ "version": "3.1.28",
4
4
  "description": "Easily access important variables such as the query string, current domain, and current page in a single object.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -28,4 +28,4 @@
28
28
  "firebase": "^8.10.1",
29
29
  "lazysizes": "^5.3.2"
30
30
  }
31
- }
31
+ }