// Load THOr script in your front-end under a <script> tag.
// This script provides you with a global variable called "thorApplicationNamespace" that will allow you to access all the API functions, constants and data attributes.
constloadScript=(
className,
url,
...
...
@@ -64,7 +60,7 @@ const loadScript = (
script.classList.add(className)
script.src=url
script.async=isAsync
script.onload=scriptLoaded// When your application loads for the first time, you must initialize THOR calling thorApplicationNamespace.loadClaimingInfo()
script.onload=scriptLoaded
document.body.appendChild(script)
}
...
...
@@ -80,44 +76,28 @@ class OrcidClaim extends React.Component {
claimed:false,
userData:null,
}
// Load THOr script in your front-end under a <script> tag.
if (document.getElementsByClassName('thor-script').length===0){