Skip to content

Commit

Permalink
More work on issue #7
Browse files Browse the repository at this point in the history
  • Loading branch information
EphraimB committed Nov 29, 2015
1 parent bcf959b commit 07dc7ab
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -710,40 +710,47 @@ submitButton.onclick = function()
function conversationStarter()
{
var personTwoReply = personTwoSays.value.toLowerCase();
var grammer;

if(keywordInFullSentance("technology", personTwoReply))
{
var topic = "1019";
grammer = "about ";
topicFeed();
}

else if(keywordInFullSentance("movies", personTwoReply))
{
var topic = "1045";
grammer = "about ";
topicFeed();
}

else if(keywordInFullSentance("sports", personTwoReply))
{
var topic = "1055";
grammer = "that ";
topicFeed();
}

else if(keywordInFullSentance("politics", personTwoReply))
{
var topic = "1014";
grammer = "about the ";
topicFeed();
}

else if(keywordInFullSentance("food", personTwoReply))
{
var topic = "1053";
grammer = "that ";
topicFeed();
}

else if(keywordInFullSentance("music", personTwoReply))
{
var topic = "1039";
grammer = "about ";
topicFeed();
}

Expand Down Expand Up @@ -832,10 +839,12 @@ submitButton.onclick = function()

if(topicKeywordInFullSentance("what") && topicKeywordInFullSentance("is"))
{
titleValue.deleteData(0, 7);
var startTwo = topicStarter.search("what");

titleValue.deleteData(startTwo, 7);
}

personOneTalk.innerHTML = "Have you heard about " + titleValue.nodeValue + "?";
personOneTalk.innerHTML = "Have you heard " + grammer + titleValue.nodeValue + "?";

submitButtonFour.onclick = function()
{
Expand Down

0 comments on commit 07dc7ab

Please sign in to comment.