added quotes, removed audio

This commit is contained in:
Claudio Maggioni 2018-11-26 10:25:39 +01:00
parent e3d5943d3f
commit fd9d1657d9
4 changed files with 35 additions and 19 deletions

BIN
rb.mp3

Binary file not shown.

BIN
rb.ogg

Binary file not shown.

View file

@ -3,20 +3,12 @@
<head>
<meta charset="utf-8"/>
<meta http-equiv="refresh" content="30; https://www.youtube.com/watch?v=dQw4w9WgXcQ">
<title id="title">USI Simulator</title>
<title>USI Simulator</title>
<link rel="stylesheet" href="./simulator.css"/>
</head>
<body>
<audio id="audio" autoplay loop>
<script>
if(navigator.userAgent.match("OPR"))
document.write("<source src=\"./rb.ogg\" type=\"audio/ogg\">");
else document.write("<source src=\"./rb.mp3\" type=\"audio/mpeg\">");
</script>
</audio>
<h1 id="quote">MALUSA</h1>
<h1 id="quote">USI Simulator</h1>
<div id="images">
<img id="img1" style="display: none"/>
<img id="img2" style="display: none"/>

View file

@ -1,18 +1,41 @@
var looper;
var images = ["bavota.png", "nystrom.png", "langhhhhhhhhheeeeinrichhhhhh.png"];
var quotes = ["PIPISTRELLO","VATTELAPESCA","SAMPDORIA","DEPRECATO","QRM","JOOMLA","8086","ETHERNET","COLLISIONE","XEROX","DIGITAL","IBM",
"CHARAT","FIELDSET","TABINDEX","TD","HTML","FUNCTION","STYLE : TD","UNDERLINE","&lt;HEAD&gt;","&lt;BODY&gt;","PREAMBOLO","FISCHIO",
"CAVO COASSIALE","FIRST COME FIRST SERVED","BUSTA","STAZIONE","QUI QUO QUA","FIFO","255.255.255.0","ALICE","...NEL PAESE DELLE MERAVIGLIE",
"LEA DX 9","GETELEMENTBYID","FAI UN SALTO","ISO OSI","DISPATCHER","SCHEDULER","BOLLINO BLU","PACCHETTO","XHTML","&lt;b&gt; e &lt;i&gt;",
"CHIODI","QUESITO","OLIVETTI","REQUEST","TOKEN RING","INT 21H","IFRAME","GIOCHINO","BATTAGLIA NAVALE","MELA","SNAKE CON IL SERPENTE CHE NON SI ALLUNGA",
"SCHEDULER","STATO DI PRONTO","PHP","FORM ACTION="];
var quotes = [
"ummmm...",
"you know...",
"funky quiz",
"funky feedback",
"funky gates",
"close your laptops",
"hands on",
"frugal maps",
"null is the devil",
"haskell is better",
"for some definitions of fun",
"no loops",
"bogosort > bubblesort",
"logisim",
"mic-1",
"maxima",
"proof by contradiction",
"proof by induction",
"exactly what we need to show",
"but we need to prove it",
"what did we do last week?",
"someone else?",
"Bin, is the hands-on online?",
"Guys please",
"check-expect or die",
"Trees!",
"without loss of generality"
];
document.addEventListener("DOMContentLoaded", setup);
function setup() {
changeImages();
window.setInterval(changeImages, 15 * (360 / 5));
changeQuotes(150, 10);
changeQuotes(250, 10);
document.getElementById("img1").removeAttribute("style");
document.getElementById("img2").removeAttribute("style");
document.getElementById("img3").removeAttribute("style");
@ -25,10 +48,11 @@ function changeImages() {
imageOffset++;
}
var quote = 0;
function changeQuotes(time, offset) {
var quote = Math.floor(Math.random() * quotes.length);
quote += 1 + Math.floor(Math.random() * (quotes.length - 2));
quote = quote % quotes.length;
document.getElementById("quote").innerHTML =
document.getElementById("title").innerHTML =
quotes[quote];
window.setTimeout(function() {
changeQuotes(time, offset);