Skip to content

Instantly share code, notes, and snippets.

@brudil
Created November 27, 2017 21:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brudil/dec78b09ebd1152f4b10410338eabaae to your computer and use it in GitHub Desktop.
Save brudil/dec78b09ebd1152f4b10410338eabaae to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<link href="https://fonts.googleapis.com/css?family=Lato:900" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/lodash/4/lodash.min.js"></script>
</head>
<body>
<button class="genButton">Click me</button>
<h1 class="idea"></h1>
</body>
</html>
const noun = [
'do an impression of Donald Trump',
'do an impression of an elephant',
'do an impression of a Dalek',
'do an impression of a cow',
'do an impression of a cat',
'do an impression of ',
'act out a scene from',
'name an episode of Friends',
'name a non-human Harry Potter character',
'name a Harry Potter Character',
'name a part of their body that begins with',
'name a chess piece',
'name a cheese',
'name a spice girl',
'name a song by Take That',
'name a herb',
'name a condiment',
'name a sex position while demonstrating it to the group',
'sneeze',
'shake your own hand',
'say the number of people in the room',
'name a famous fox',
'take off a shoe',
'take off a sock',
'find an egg',
'bring something from the kitchen and eat it in front of everyone',
'point at someone taller than you',
'point at someone shorter than you',
'point at someone younger than you',
'point at someone older than you',
'text a friend',
'text a person who isn’t in the room',
'text a relative',
'take a selfie on someone else’s phone',
];
function select(arr) {
return _.sample(arr);
}
const syntax = [
() => `Be the first to... <br><br>...${select(noun)}`,
];
function genLine() {
document.querySelector('.idea').innerHTML = select(syntax)();
}
genLine();
document.querySelector('.genButton').addEventListener('click', () => genLine())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment