Skip to content

Commit

Permalink
Issue #19 is complete!
Browse files Browse the repository at this point in the history
  • Loading branch information
EphraimB committed Dec 1, 2015
1 parent bddd2e0 commit ad23f5e
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ var submitButtonInterestsAgain = document.createElement("button");
var submitButtonOnlyInterestConfirm = document.createElement("button");
var submitButtonRestartInterestCondition = document.createElement("button");
var submitButtonOtherInterests = document.createElement("button");
var submitButtonOnlyInterestConfirmYesOrNo = document.createElement("button");

var yourInterests = [];
var otherInterestsOn = false;
Expand Down Expand Up @@ -251,6 +252,11 @@ personTwoSays.onkeypress = function(event)
submitButtonOtherInterests.click();
}

else if(event.keyCode == 13 && conversationPart == 18)
{
submitButtonOnlyInterestConfirmYesOrNo.click();
}

};

function keywordInFullSentance(keyword, fullSentance)
Expand Down Expand Up @@ -780,7 +786,7 @@ submitButton.onclick = function()
submitButtonOnlyInterestConfirm.innerHTML = "Submit";
personTwoTalk.appendChild(submitButtonOnlyInterestConfirm);

submitButtonOnlyInterestConfirm.onclick = function()
submitButtonOnlyInterestConfirm.onclick = function interestConfirm()
{
submitButtonOnlyInterestConfirm.style.display = "none";
var personTwoReply = personTwoSays.value.toLowerCase();
Expand Down Expand Up @@ -816,9 +822,24 @@ submitButton.onclick = function()

else
{
conversationPart = 18;

personTwoSays.value = "";


personOneTalk.innerHTML = "Either yes or no.";

submitButtonOnlyInterestConfirmYesOrNo.innerHTML = "Submit";
personTwoTalk.appendChild(submitButtonOnlyInterestConfirmYesOrNo);

submitButtonOnlyInterestConfirmYesOrNo.style.display = "inline";

submitButtonOnlyInterestConfirmYesOrNo.onclick = function()
{
submitButtonOnlyInterestConfirmYesOrNo.style.display = "none";

interestConfirm();
};

}

};
Expand Down Expand Up @@ -990,7 +1011,7 @@ submitButton.onclick = function()

submitButtonFour.onclick = function()
{
conversationPart = 18;
conversationPart = 19;

personTwoSays.value = "";

Expand Down

0 comments on commit ad23f5e

Please sign in to comment.