Skip to content

Instantly share code, notes, and snippets.

@alicemaz
Created April 16, 2015 06:52
Show Gist options
  • Save alicemaz/87a2fc2fed44c3d35ffb to your computer and use it in GitHub Desktop.
Save alicemaz/87a2fc2fed44c3d35ffb to your computer and use it in GitHub Desktop.
do {
if (data[bigram_index] !== undefined) {
my_word = my_word.charAt(0).toUpperCase() + my_word.slice(1);
var gram1 = data[bigram_index].gram1.charAt(0).toUpperCase() + data[bigram_index].gram1.slice(1);
var gram2 = data[bigram_index].gram2;
final_tweet = "Knock knock!\nWho's there?\n" + my_word + "!\n" + my_word + " who?\n" + gram1 + " " + gram2 + "!";
if (!wordfilter.blacklisted(final_tweet)) post_tweet();
else final_tweet = "";
break;
}
} while (bigram_index --> 0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment