web-manager 2.1.24 → 2.1.26

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 (3) hide show
  1. package/index.js +11 -0
  2. package/lib/dom.js +2 -2
  3. package/package.json +2 -2
package/index.js CHANGED
@@ -240,6 +240,17 @@ function Manager() {
240
240
  user.getIdToken(false)
241
241
  .then(function(token) {
242
242
  var done;
243
+ // fetch('https://us-central1-' + This.properties.options.libraries.firebase_app.config.projectId + '.cloudfunctions.net/bm_api', {
244
+ // method: 'POST',
245
+ // body: JSON.stringify({
246
+ // authenticationToken: token,
247
+ // command: 'signup-handler',
248
+ // payload: {
249
+ // newsletterSignUp: domLib.select('.auth-newsletter-input').getValue(),
250
+ // affiliateCode: This.storage().get('auth.affiliateCode', '')
251
+ // }
252
+ // }),
253
+ // })
243
254
  fetch('https://us-central1-' + This.properties.options.libraries.firebase_app.config.projectId + '.cloudfunctions.net/bm_signUpHandler', {
244
255
  method: 'POST',
245
256
  body: JSON.stringify({
package/lib/dom.js CHANGED
@@ -261,12 +261,12 @@ Dom.loadScript = function(options, callback) {
261
261
  s.setAttribute('crossorigin','*');
262
262
  }
263
263
  s.onload = function() {
264
- callback();
264
+ if (callback) { callback(); }
265
265
  return resolve();
266
266
  };
267
267
  s.onerror = function() {
268
268
  var error = new Error('Failed to load script ' + options.src);
269
- callback(error);
269
+ if (callback) { callback(error); }
270
270
  return reject(error);
271
271
  };
272
272
  document.head.appendChild(s);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-manager",
3
- "version": "2.1.24",
3
+ "version": "2.1.26",
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.0",
29
29
  "lazysizes": "^5.3.2"
30
30
  }
31
- }
31
+ }