r/javascript • • Nov 24 '17

large image I am the best webdev

Don't blame me for being awesome

(function r() {
  setTimeout(r, Math.random() * 10);
  let el = document.createElement(`div`);
  el.innerHTML = `🍆`;
  el.style.position = `absolute`;
  el.style.zIndex = 999999;
  el.style.fontSize = (((Math.random() * 48) | 0) + 16) + `px`;
  el.style.left = ((Math.random() * innerWidth) | 0) + `px`;
  el.style.top = ((Math.random() * (innerHeight + pageYOffset)) | 0) + `px`;
  document.body.appendChild(el);
})();
533 Upvotes

108 comments sorted by

View all comments

37

u/[deleted] Nov 24 '17

If you use linear feedback shift registers and hold the eggplant size constant, then you can randomly fill the document entirely without any eggplants overlapping. Much like the way blood would gradually populate all pixels randomly when you died in the original Wolfenstein.

http://datagenetics.com/blog/november12017/index.html

47

u/346pm Nov 24 '17

We are planning to add this as an free option, which can either be purchased or retrieved by viewing our free online ads for ~40 hours.

0

u/[deleted] Nov 24 '17

[deleted]