Comparing version 1.0.2 to 1.0.3
37
index.js
@@ -33,25 +33,20 @@ 'use strict'; | ||
value: function componentDidMount() { | ||
if (!window.__3fp) { | ||
var _props = this.props, | ||
license = _props.license, | ||
onLoaded = _props.onLoaded, | ||
onError = _props.onError; | ||
var _props = this.props, | ||
license = _props.license, | ||
onLoaded = _props.onLoaded, | ||
onError = _props.onError; | ||
if (!license) { | ||
console.error('You forgot to provide 3ForPage license id. Widgets will not work correctly.'); | ||
return; | ||
} | ||
if (!license) { | ||
console.error('You forgot to provide 3ForPage license id. Widgets will not work correctly.'); | ||
return; | ||
} | ||
window.__3fp = window.__3fp || {}; | ||
window.__3fp.license = license; | ||
var fp = document.createElement('script'); | ||
fp.type = 'text/javascript'; | ||
fp.async = true; | ||
fp.src = 'https://widgets-3forpage.firebaseapp.com/widgets.js'; | ||
var s = document.getElementsByTagName('script')[0]; | ||
s.parentNode.insertBefore(fp, s); | ||
fp.addEventListener('load', onLoaded); | ||
fp.addEventListener('error', onError); | ||
} | ||
var fp = document.createElement('script'); | ||
fp.type = 'text/javascript'; | ||
fp.async = true; | ||
fp.src = 'https://widgets.3forpage.com/main.js?id=' + license; | ||
var s = document.getElementsByTagName('script')[0]; | ||
s.parentNode.insertBefore(fp, s); | ||
fp.addEventListener('load', onLoaded); | ||
fp.addEventListener('error', onError); | ||
} | ||
@@ -58,0 +53,0 @@ }, { |
{ | ||
"name": "3forpage", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "React component for widgets from 3forpage.com", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3466
47