Archived
1
0
This repository has been archived on 2023-08-12. You can view files and clone it, but cannot push or open issues or pull requests.
wzeth d64be9150d fix the jumping beans effect
Pages will jump if image size isn't explicitly declared.
2016-11-02 09:01:38 -04:00

16 lines
363 B
JavaScript

var banner_count = 5;
// 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);
}