16 lines
363 B
JavaScript
16 lines
363 B
JavaScript
var banner_count = 6;
|
|
|
|
// inject a banner into an element
|
|
function nntpchan_inject_banners(elem, prefix) {
|
|
var n = Math.floor(Math.random() * banner_count);
|
|
var banner = prefix + "static/banner_"+n+".jpg";
|
|
var e = document.createElement("img");
|
|
e.src = banner;
|
|
e.id = "nntpchan_banner";
|
|
e.height = "150";
|
|
e.width = "300";
|
|
elem.appendChild(e);
|
|
}
|
|
|
|
|