JSFiddle - React, Tailwind, and code Playground
by adeneo
HTML
<g:plusone annotation="inline"></g:plusone>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
JavaScript
var i=0, checkPlusone = setInterval(function() {
if (typeof gapi!='undefined') {
if (gapi.hasOwnProperty('plusone')) {
clearInterval(checkPlusone);
console.log('Plusone loaded');
}
}
if (i>5000) {
clearInterval(checkPlusone);
console.log('Plusone not loaded');
}
i=i+300;
}, 300);