Skip to content

Commit

Permalink
Update open-flood.html
Browse files Browse the repository at this point in the history
  • Loading branch information
BreadGhoti authored Jan 28, 2024
1 parent 325c58d commit fa58e4c
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions open-flood.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<button id="begin">start the fun!</button>
<button id="end">stop the insanity!</button>
2 windows will popup. And they will randomly change their contents.
<script>
var stop = false;
var popups = {};
var minWords = 2;
var maxWords = 6;
var words = [ "pea", "peas", "p", "p's" ]
var iwords = words.length-1;

<button id="begin">start the fun!</button>
<button id="end">stop the insanity!</button>
2 windows will popup. And they will randomly change their contents.
<script>
var stop = false;
var popups = {};
var minWords = 2;
var maxWords = 6;
var words = [ "pea", "peas", "p", "p's" ]
var iwords = words.length-1;

function randomNumber(min, max){
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function randomNumber(min, max){
return Math.floor(Math.random() * (max - min + 1)) + min;
}

function randomWord() {
return words[randomNumber(0, iwords)];
Expand Down

0 comments on commit fa58e4c

Please sign in to comment.