Created
May 3, 2014 04:37
-
-
Save lmmx/a312d824c3c0f65fc823 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (l=0;l<doilist.length;l++){ | |
newBadge = document.createElement('div'); | |
if (l=0 && document.querySelector('div.post').offsetLeft > 300) {lr='left';} | |
else {lr='right';} | |
newBadge.setAttribute('data-badge-popover',lr); | |
newBadge.setAttribute('data-badge-type','medium-donut'); | |
newBadge.setAttribute('data-doi',doilist[l]); | |
newBadge.setAttribute('data-hide-no-mentions','true'); | |
newBadge.className = "altmetric-embed"; | |
document.getElementById('altmetBox').appendChild(newBadge); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment