I want to create a javascript badge that displays a list of links. We host the javascript on our domain. Other sites can put an empty div tag on their page and at the botto
You do not necessary need an initial div to fill with you link list.
Simply create the div using document.write at the place where the script is placed.
... and in your script:
var links = [
'One',
'Two',
'Three'
];
document.write("" + links.join(", ") + "");
Another benefit is that you do not have to wait for the page to be fully loaded.