web-manager 3.1.0 → 3.1.1

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -286,6 +286,11 @@ For these, you must first call `.account().resolve()`
286
286
  * `.auth-created-element`: Add to any element to show the local string for account creation date
287
287
  * `.auth-phone-element`: Add to any element to display the user's phone
288
288
 
289
+ * `.auth-referral-count-element`: Update this element with the user's referral count
290
+ * `.auth-referral-code-element`: Update this element with the user's referral code
291
+ * `.auth-referral-link-element`: Update this element with the user's referral link
292
+ * `.auth-referral-social-link`: Update this element with the user's referral link for socials where `data-provider` is the social network
293
+
289
294
  * Future additions (not added yet)
290
295
  * `auth-link-provider-btn`: Initiate a link to the `data-provider` in this element
291
296
  * `auth-unlink-provider-btn`: Initiate an unlink to the `data-provider` in this element
package/lib/account.js CHANGED
@@ -245,7 +245,7 @@ Account.prototype._resolveAccount = function (currentUser, account, options) {
245
245
 
246
246
  if (utilities.get(isDevelopment)) {
247
247
  currentURL.searchParams
248
- .forEach((value, key) => {
248
+ .forEach(function(value, key) {
249
249
  var accountValue = utilities.get(account, key, undefined)
250
250
  if (typeof accountValue !== undefined) {
251
251
  if (value === 'true') { value = true }
@@ -399,19 +399,19 @@ Account.prototype._resolveAccount = function (currentUser, account, options) {
399
399
  $el.setAttribute('target', '_blank')
400
400
 
401
401
  if (provider === 'facebook') {
402
- $el.setAttribute('href', `https://www.facebook.com/sharer.php?u=${affiliateLinkURI}`)
402
+ $el.setAttribute('href', 'https://www.facebook.com/sharer.php?u=' + (affiliateLinkURI) + '')
403
403
  } else if (provider === 'twitter') {
404
- $el.setAttribute('href', `https://twitter.com/share?url=${affiliateLinkURI}&text=${text || affiliateLinkTextURI}`)
404
+ $el.setAttribute('href', 'https://twitter.com/share?url=' + (affiliateLinkURI) + '&text=' + (text || affiliateLinkTextURI) + '')
405
405
  } else if (provider === 'pinterest') {
406
- $el.setAttribute('href', `https://pinterest.com/pin/create/button/?url=${affiliateLinkURI}&description=${text || affiliateLinkTextURI}`)
406
+ $el.setAttribute('href', 'https://pinterest.com/pin/create/button/?url=' + (affiliateLinkURI) + '&description=' + (text || affiliateLinkTextURI) + '')
407
407
  } else if (provider === 'tumblr') {
408
- $el.setAttribute('href', `https://www.tumblr.com/share/link?url=${affiliateLinkURI}&text=${text || affiliateLinkTextURI}`)
408
+ $el.setAttribute('href', 'https://www.tumblr.com/share/link?url=' + (affiliateLinkURI) + '&text=' + (text || affiliateLinkTextURI) + '')
409
409
  } else if (provider === 'linkedin') {
410
- $el.setAttribute('href', `https://www.linkedin.com/sharing/share-offsite/?url=${affiliateLinkURI}&title=${text || affiliateLinkTextURI}`)
410
+ $el.setAttribute('href', 'https://www.linkedin.com/sharing/share-offsite/?url=' + (affiliateLinkURI) + '&title=' + (text || affiliateLinkTextURI) + '')
411
411
  // $el.setAttribute('href', `http://www.linkedin.com/shareArticle?mini=true&url=https://stackoverflow.com/questions/10713542/how-to-make-custom-linkedin-share-button/10737122&title=How%20to%20make%20custom%20linkedin%20share%20button&summary=some%20summary%20if%20you%20want&source=stackoverflow.com`)
412
- // $el.setAttribute('href', `http://www.linkedin.com/shareArticle?mini=false&url=${affiliateLinkURI}&title=${text || affiliateLinkTextURI}`)
412
+ // $el.setAttribute('href', `http://www.linkedin.com/shareArticle?mini=false&url=' + affiliateLinkURI + '&title=' + text || affiliateLinkTextURI + '`)
413
413
  } else if (provider === 'reddit') {
414
- $el.setAttribute('href', `http://www.reddit.com/submit?url=${affiliateLinkURI}&title=${text || affiliateLinkTextURI}`)
414
+ $el.setAttribute('href', 'http://www.reddit.com/submit?url=' + (affiliateLinkURI) + '&title=' + (text || affiliateLinkTextURI) + '')
415
415
  }
416
416
  })
417
417
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-manager",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
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
+ }