From 0feaf568e93884328943cdeef1f073b852eb0b59 Mon Sep 17 00:00:00 2001 From: Tyler Hallada Date: Wed, 4 Jul 2018 19:24:29 -0400 Subject: [PATCH] Done --- billboard.js | 54 ++++++++++++++++++ index.html | 38 ++++++++++++ ...20171201-180714-516307-740daec-24931da.ttf | Bin 0 -> 8724 bytes 3 files changed, 92 insertions(+) create mode 100644 billboard.js create mode 100644 index.html create mode 100644 linearx-20171201-180714-516307-740daec-24931da.ttf diff --git a/billboard.js b/billboard.js new file mode 100644 index 0000000..0bf5227 --- /dev/null +++ b/billboard.js @@ -0,0 +1,54 @@ +function genRandomText(length) { + var text = ""; + var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 .?-!(),\"'"; + + for (var i = 0; i < length; i++) + text += possible.charAt(Math.floor(Math.random() * possible.length)); + + return text; +} + +function genRandomInt(min, max) { + // inclusive min & max + return Math.floor(Math.random() * (max - min + 1)) + min; +} + +function shiftArrayToRight(arr, places) { + for (var i = 0; i < places; i++) { + arr.unshift(arr.pop()); + } +} + +function textFillsScreen() { + var root = document.compatMode == 'BackCompat' ? document.body : document.documentElement; + return root.scrollHeight > root.clientHeight; +} + +function fillScreenWithWhitespace() { + var text = document.getElementById("text"); + var charArray = [" "]; + var whitespace = "               "; + while(!textFillsScreen()) { + text.innerHTML += whitespace; + charArray.push.apply(charArray, [" ", " ", " ", " ", " ", " ", " ", " ", + " ", " ", " ", " ", " ", " ", " "]); + } + for (var i = 0; i < 26; i++) { + text.innerHTML += whitespace; + charArray.push.apply(charArray, [" ", " ", " ", " ", " ", " ", " ", " ", + " ", " ", " ", " ", " ", " ", " "]); + } + return charArray; +} + +window.onload = function () { + var textElem = document.getElementById('text'); + var charArray = fillScreenWithWhitespace(); + window.setInterval(function () { + for (var i = 0; i < genRandomInt(1, 4); i++) { + charArray[genRandomInt(0, charArray.length - 1)] = genRandomText(1); + textElem.innerHTML = charArray.join(""); + } + shiftArrayToRight(charArray, 1); + }, 25) +} diff --git a/index.html b/index.html new file mode 100644 index 0000000..1845ae7 --- /dev/null +++ b/index.html @@ -0,0 +1,38 @@ + + + Billboard + + + + + + + +

 

+ + + + + + + + diff --git a/linearx-20171201-180714-516307-740daec-24931da.ttf b/linearx-20171201-180714-516307-740daec-24931da.ttf new file mode 100644 index 0000000000000000000000000000000000000000..f3fe9688215b7aa0432c648fb6303a06d0491e91 GIT binary patch literal 8724 zcmb_i3wRVowyvt~=}AH$OdgXUA?Zm-#$-%}nMpEv3}Fz60gOBoq8T6$2t-4Yg#d8{ zf(jSc$dYA2SFcfws62ci>s^tnnB4>xS5$DtCtlHY)y2p9+)dJtxqtOcK>fb!-ur!b z!gNQh>nWXWy@EXR&6?JRcfuCgI?o@A4`co}aeZ=C zT}K-^K(5DlA+F_?x>d_}+}HaLLMD8Ids5n3*R)4H9D{3H1jauhd~Nu?JNoX%r7^zm z$S4sVguH&0uYcsM*C>-EMSKd^5rpwxeDI9;lrotFB)?u0ERz&trqEdEC>lKtq==Y| z4*n!H`urr<=n*A9?dGHGZgvViJ3?prDe=%q^b!+};SV%+=`*)+#xmGLCJ!3Y2E?aC zE-haRAwJ_M6Ds*h8gJuldZ?VOA>U?m3B?OPK^})5l^SHh-xD+#1 z;*K-He)=s9U@ad7OYy$nV03G60DourTZ6yiSH_$F202P0*AZw0AB;bN<8jRWVsI<_ zkoV!kwZOm0;k8c36<>8S5y|B^OE^;~ZWDPBC?i}$!C>$&!RN#Gql-%T;>8H;1KQ;LOFlP89$qxUulY7WMa)g|wj83Elw4Sb`hv*3=F)PbuWvq%FU~jX}m@cFU zrNT8rtO?|f39+P) zVm}C(!=AAE5SCI z+9dx_Ur$d@$OD#0ezBL2SuT!=q_?-1Lk}Jk9FY91ALFA&?znUxpNEnD{(fyTM8f?- zutjN*+C(3oj3Uq{Ij8>Y30ll8SouR!jyt}BU&X?iyiPy8fBA+@_O(HCKT-j^9Bbvlu30}&VlwhXb z1e@K4Sm+#%ruS%{7PEw6(X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