diff --git a/main.js b/main.js index 8fae5a8..a715b58 100644 --- a/main.js +++ b/main.js @@ -1136,8 +1136,6 @@ function SaveQuiz(quiz, questionData) { var allQ = 0; var addedQ = 0; var newQuestions = []; - console.log("QUIZ:"); - console.log(quiz); for (var i = 0; i < quiz.length; i++) // going though quiz { // searching for same questions in questionData @@ -1527,22 +1525,24 @@ function ShowMessage(msgItem, timeout, funct) { } var buttonMargin = "2px 2px 2px 2px"; // uniform button margin - // PREV SUGG BUTTON ------------------------------------------------------------------------------------------------------------ - var prevSuggButton = CreateNodeWithText(prevSuggestionCell, "<", "button"); - prevSuggButton.style.margin = buttonMargin; // fancy margin + if (msgItem[currItem].length == 0) { // TODO: test this + // PREV SUGG BUTTON ------------------------------------------------------------------------------------------------------------ + var prevSuggButton = CreateNodeWithText(prevSuggestionCell, "<", "button"); + prevSuggButton.style.margin = buttonMargin; // fancy margin - prevSuggButton.addEventListener("click", function() { - ChangeCurrRelevantQuestionIndex(-1); - SetQuestionText(); - }); - // NEXT SUGG BUTTON ------------------------------------------------------------------------------------------------------------ - var nextSuggButton = CreateNodeWithText(nextSuggestionCell, ">", "button"); - nextSuggButton.style.margin = buttonMargin; // fancy margin + prevSuggButton.addEventListener("click", function() { + ChangeCurrRelevantQuestionIndex(-1); + SetQuestionText(); + }); + // NEXT SUGG BUTTON ------------------------------------------------------------------------------------------------------------ + var nextSuggButton = CreateNodeWithText(nextSuggestionCell, ">", "button"); + nextSuggButton.style.margin = buttonMargin; // fancy margin - nextSuggButton.addEventListener("click", function() { - ChangeCurrRelevantQuestionIndex(1); - SetQuestionText(); - }); + nextSuggButton.addEventListener("click", function() { + ChangeCurrRelevantQuestionIndex(1); + SetQuestionText(); + }); + } // deciding if has multiple questions ------------------------------------------------------------------------------------------------ if (msgItem.length == 1) { SetQuestionText(); @@ -1960,6 +1960,7 @@ function NormalizeSpaces(input) { } function SendXHRMessage(message) { + console.log("HAAAAAAAAAAAAAAAAAAAAAAAAAAA"); var url = serverAdress + "isAdding"; GM_xmlhttpRequest({