diff --git a/script.js b/script.js index 5ebcd87..dca9b2b 100755 --- a/script.js +++ b/script.js @@ -32,54 +32,57 @@ var chat = document.querySelector('.mock-chat'); if (chat) { var names = ['Sam', 'Ruth', 'Kai', 'Milo', 'Jules', 'Bea', 'Ollie', 'Finn', 'Pip', 'Nora', 'Leo', 'Ada']; - // Each convo: [speakerIndex, message] x3. speakerIndex 0-2 maps to chosen names. + // [speakerIndex, message]. speakerIndex 0-2 maps to chosen names. var convos = [ - // knock-knock (joker=0, responder=1, joker=0) - [[0,"Knock, knock!"], [1,"Who's there?"], [0,"Lettuce. Lettuce who? Lettuce in, it's cold out here!"]], - [[0,"Knock, knock!"], [1,"Who's there?"], [0,"Cow says. Cow says who? No silly, cow says moo!"]], - [[0,"Knock, knock!"], [1,"Who's there?"], [0,"Tank. Tank who? You're welcome!"]], - [[0,"Knock, knock!"], [1,"Who's there?"], [0,"Alpaca. Alpaca who? Alpaca the snacks, you grab the map!"]], - [[0,"Knock, knock!"], [1,"Who's there?"], [0,"Dishes. Dishes who? Dishes the police, open up!"]], - [[0,"Knock, knock!"], [1,"Who's there?"], [0,"Cargo. Cargo who? Cargo beep beep, vroom vroom!"]], - [[0,"Knock, knock!"], [1,"Who's there?"], [0,"Nobel. Nobel who? Nobel, that's why I knocked!"]], - [[0,"Knock, knock!"], [1,"Who's there?"], [0,"Butter. Butter who? Butter open the door, it's chilly!"]], - [[0,"Knock, knock!"], [1,"Who's there?"], [0,"Etch. Etch who? Bless you!"]], - [[0,"Knock, knock!"], [1,"Who's there?"], [0,"Ketchup. Ketchup who? Ketchup with me and I'll tell you!"]], - [[0,"Knock, knock!"], [1,"Who's there?"], [0,"Owls say. Owls say who? Yep, they sure do!"]], - [[0,"Knock, knock!"], [1,"Who's there?"], [0,"Annie. Annie who? Annie thing you can do, I can do better!"]], - // dad jokes / banter (2 people) - [[0,"Why did the scarecrow get promoted?"], [1,"No idea, why?"], [0,"He was outstanding in his field!"]], - [[0,"I'm reading a book on anti-gravity."], [1,"Oh yeah? How is it?"], [0,"Impossible to put down!"]], - [[0,"What do you call a fake noodle?"], [1,"Hmm... I give up."], [0,"An impasta!"]], - [[0,"Why don't eggs tell jokes?"], [1,"Why not?"], [0,"They'd crack each other up!"]], - [[0,"Did you hear about the claustrophobic astronaut?"], [1,"Oh no, what happened?"], [0,"He just needed a little space."]], - [[0,"What do you call cheese that isn't yours?"], [1,"What?"], [0,"Nacho cheese!"]], - [[0,"Why did the bicycle fall over?"], [1,"Why?"], [0,"It was two-tired!"]], - [[0,"What did the ocean say to the beach?"], [1,"What did it say?"], [0,"Nothing, it just waved!"]], - [[0,"Why can't you trust stairs?"], [1,"Tell me."], [0,"They're always up to something."]], - [[0,"What do you call a bear with no teeth?"], [1,"A what?"], [0,"A gummy bear!"]], - [[0,"I'm afraid for the calendar."], [1,"Why's that?"], [0,"Its days are numbered."]], - [[0,"What do you call a fish with no eyes?"], [1,"I don't know..."], [0,"A fsh!"]], - [[0,"Why did the math book look so sad?"], [1,"Poor thing, why?"], [0,"It had too many problems."]], - [[0,"I made a belt out of watches."], [1,"And...?"], [0,"It was a waist of time."]], - [[0,"Why do cows have hooves instead of feet?"], [1,"Why?"], [0,"Because they lactose!"]], - [[0,"What do you call a dog that can do magic?"], [1,"What?"], [0,"A Labracadabrador!"]], - [[0,"Why don't scientists trust atoms?"], [1,"Why?"], [0,"Because they make up everything!"]], - [[0,"What do you call a sleeping dinosaur?"], [1,"I dunno."], [0,"A dino-snore!"]], - [[0,"Why did the golfer bring two pairs of pants?"], [1,"Just in case...?"], [0,"In case he got a hole in one!"]], - [[0,"What do you call a pile of cats?"], [1,"What?"], [0,"A meowtain!"]], - [[0,"I used to be a baker."], [1,"Oh really?"], [0,"Yeah, but I couldn't make enough dough."]], + // knock-knock (5 lines, proper format) + [[0,"Knock, knock!"],[1,"Who's there?"],[0,"Lettuce."],[1,"Lettuce who?"],[0,"Lettuce in, it's cold out here!"]], + [[0,"Knock, knock!"],[1,"Who's there?"],[0,"Cow says."],[1,"Cow says who?"],[0,"No silly, cow says moo!"]], + [[0,"Knock, knock!"],[1,"Who's there?"],[0,"Tank."],[1,"Tank who?"],[0,"You're welcome!"]], + [[0,"Knock, knock!"],[1,"Who's there?"],[0,"Alpaca."],[1,"Alpaca who?"],[0,"Alpaca the snacks, you grab the map!"]], + [[0,"Knock, knock!"],[1,"Who's there?"],[0,"Dishes."],[1,"Dishes who?"],[0,"Dishes the police, open up!"]], + [[0,"Knock, knock!"],[1,"Who's there?"],[0,"Cargo."],[1,"Cargo who?"],[0,"Cargo beep beep, vroom vroom!"]], + [[0,"Knock, knock!"],[1,"Who's there?"],[0,"Nobel."],[1,"Nobel who?"],[0,"Nobel, that's why I knocked!"]], + [[0,"Knock, knock!"],[1,"Who's there?"],[0,"Butter."],[1,"Butter who?"],[0,"Butter open the door, it's chilly!"]], + [[0,"Knock, knock!"],[1,"Who's there?"],[0,"Etch."],[1,"Etch who?"],[0,"Bless you!"]], + [[0,"Knock, knock!"],[1,"Who's there?"],[0,"Ketchup."],[1,"Ketchup who?"],[0,"Ketchup with me and I'll tell you!"]], + [[0,"Knock, knock!"],[1,"Who's there?"],[0,"Owls say."],[1,"Owls say who?"],[0,"Yep, they sure do!"]], + [[0,"Knock, knock!"],[1,"Who's there?"],[0,"Annie."],[1,"Annie who?"],[0,"Annie thing you can do, I can do better!"]], + [[0,"Knock, knock!"],[1,"Who's there?"],[0,"Boo."],[1,"Boo who?"],[0,"Hey, don't cry, it's just a joke!"]], + [[0,"Knock, knock!"],[1,"Who's there?"],[0,"Interrupting cow."],[1,"Interrupting cow wh-"],[0,"MOO!"]], + [[0,"Knock, knock!"],[1,"Who's there?"],[0,"Dozen."],[1,"Dozen who?"],[0,"Dozen anyone want to let me in?"]], + [[0,"Knock, knock!"],[1,"Who's there?"],[0,"Ice cream."],[1,"Ice cream who?"],[0,"Ice cream every time I see a scary movie!"]], + [[0,"Knock, knock!"],[1,"Who's there?"],[0,"Olive."],[1,"Olive who?"],[0,"Olive you and I miss you!"]], + // dad jokes / banter (3 lines, 2 people) + [[0,"Why did the scarecrow get promoted?"],[1,"No idea, why?"],[0,"He was outstanding in his field!"]], + [[0,"I'm reading a book on anti-gravity."],[1,"Oh yeah? How is it?"],[0,"Impossible to put down!"]], + [[0,"What do you call a fake noodle?"],[1,"Hmm... I give up."],[0,"An impasta!"]], + [[0,"Why don't eggs tell jokes?"],[1,"Why not?"],[0,"They'd crack each other up!"]], + [[0,"What do you call cheese that isn't yours?"],[1,"What?"],[0,"Nacho cheese!"]], + [[0,"Why did the bicycle fall over?"],[1,"Why?"],[0,"It was two-tired!"]], + [[0,"What did the ocean say to the beach?"],[1,"What did it say?"],[0,"Nothing, it just waved!"]], + [[0,"Why can't you trust stairs?"],[1,"Tell me."],[0,"They're always up to something."]], + [[0,"What do you call a bear with no teeth?"],[1,"A what?"],[0,"A gummy bear!"]], + [[0,"I'm afraid for the calendar."],[1,"Why's that?"],[0,"Its days are numbered."]], + [[0,"What do you call a fish with no eyes?"],[1,"I don't know..."],[0,"A fsh!"]], + [[0,"Why did the math book look so sad?"],[1,"Poor thing, why?"],[0,"It had too many problems."]], + [[0,"What do you call a dog that can do magic?"],[1,"What?"],[0,"A Labracadabrador!"]], + [[0,"Why don't scientists trust atoms?"],[1,"Why?"],[0,"Because they make up everything!"]], + [[0,"What do you call a sleeping dinosaur?"],[1,"I dunno."],[0,"A dino-snore!"]], + [[0,"Why did the golfer bring two pairs of pants?"],[1,"Just in case...?"],[0,"In case he got a hole in one!"]], + [[0,"What do you call a pile of cats?"],[1,"What?"],[0,"A meowtain!"]], + [[0,"I used to be a baker."],[1,"Oh really?"],[0,"Yeah, but I couldn't make enough dough."]], + [[0,"What do you call a belt made of watches?"],[1,"What?"],[0,"A waist of time!"]], + [[0,"Why did the tomato blush?"],[1,"Why?"],[0,"It saw the salad dressing!"]], // 3-person chats - [[0,"What do you call a factory that makes okay products?"], [1,"I don't know, what?"], [2,"A satisfactory!"]], - [[0,"I just got a job at the orange juice factory."], [1,"Nice! How is it?"], [2,"I heard he got fired because he couldn't concentrate."]], - [[0,"Why did the cookie go to the doctor?"], [1,"Why?"], [2,"Because it was feeling crummy!"]], - [[0,"I'm on a seafood diet."], [1,"Oh, how's that going?"], [2,"He sees food and eats it. Every time."]], - [[0,"Did you hear about the restaurant on the moon?"], [1,"No, what about it?"], [2,"Great food, no atmosphere!"]], - [[0,"What do you call a can opener that doesn't work?"], [1,"Uhh..."], [2,"A can't opener!"]], - [[0,"I told my dog a joke about fetch."], [1,"Did he laugh?"], [2,"Nah, tough crowd. He just gave you a ruff look."]], - [[0,"Why do seagulls fly over the sea?"], [1,"Why?"], [2,"Because if they flew over the bay, they'd be bagels!"]], - [[0,"What do sprinters eat before a race?"], [1,"Bananas?"], [2,"Nothing, they fast!"]], - [[0,"I asked the librarian if the library had books on paranoia."], [1,"And?"], [2,"She whispered, 'They're right behind you...'"]] + [[0,"What do you call a factory that makes okay products?"],[1,"I don't know, what?"],[2,"A satisfactory!"]], + [[0,"Did you hear about the restaurant on the moon?"],[1,"No, what about it?"],[2,"Great food, no atmosphere!"]], + [[0,"Why did the cookie go to the doctor?"],[1,"Why?"],[2,"Because it was feeling crummy!"]], + [[0,"I'm on a seafood diet."],[1,"Oh, how's that going?"],[2,"He sees food and eats it. Every time."]], + [[0,"What do you call a can opener that doesn't work?"],[1,"Uhh..."],[2,"A can't opener!"]], + [[0,"Why do seagulls fly over the sea?"],[1,"Why?"],[2,"Because if they flew over the bay, they'd be bagels!"]], + [[0,"I asked the librarian if they had books on paranoia."],[1,"And?"],[2,"She whispered, 'They're right behind you...'"]], + [[0,"What do sprinters eat before a race?"],[1,"Bananas?"],[2,"Nothing, they fast!"]], + [[0,"Why don't skeletons fight each other?"],[1,"Why not?"],[2,"They don't have the guts."]] ]; function pick(arr) { return arr[Math.floor(Math.random() * arr.length)]; @@ -96,7 +99,7 @@ var convo = pick(convos); var avs = ['av-a', 'av-b', 'av-c']; var html = ''; - for (var k = 0; k < 3; k++) { + for (var k = 0; k < convo.length; k++) { var speaker = convo[k][0]; html += '
' + '' +