Criador de Conteúdo - AWS (3)

HTML

<div id="text"></div>

JavaScript

var numeroMateria, i;
var nomeBotao = new Array();
var palavraChave = new Array();
numeroMateria = prompt("Informe o número da matéria:");
do {
    for (i = 0; i < 6; i++) {
        nomeBotao[i] = prompt("Informe o nome do botão:");
        palavraChave[i] = prompt("Informe a palavra chave:");
    }

    var lista = $('#text')[0];
    lista.insertAdjacentHTML('beforeend', "if (materia == " + numeroMateria + "){ <br>if(GUI.Button(Rect(Screen.width/2-150,Screen.height/2-100, 300, 35)," + " " + '"' + nomeBotao[0] + '"' + ")){ <br>Dicionario.aux = true; <br>Dicionario.field = " + '"' + palavraChave[0] + '"' + ";<br>}<br><br>" + "if(GUI.Button(Rect(Screen.width/2-150,Screen.height/2-50, 300, 35)," + " " + '"' + nomeBotao[1] + '"' + ")){ <br>Dicionario.aux = true; <br>Dicionario.field = " + '"' + palavraChave[1] + '"' + ";<br>}<br><br>" + "if(GUI.Button(Rect(Screen.width/2-150,Screen.height/2, 300, 35)," + " " + '"' + nomeBotao[2] + '"' + ")){ <br>Dicionario.aux = true; <br>Dicionario.field = " + '"' + palavraChave[2] + '"' + ";<br>}<br><br>" + "if(GUI.Button(Rect(Screen.width/2-150,Screen.height/2+50, 300, 35))," + " " + '"' + nomeBotao[3] + '"' + ")){ <br>Dicionario.aux = true; <br>Dicionario.field = " + '"' + palavraChave[3] + '"' + ";<br>}<br><br>" + "if(GUI.Button(Rect(Screen.width/2-150,Screen.height/2+100, 300, 35)," + " " + '"' + nomeBotao[4] + '"' + ")){ <br>Dicionario.aux = true; <br>Dicionario.field = " + '"' + palavraChave[4] + '"' + ";<br>}<br><br>" + "if(GUI.Button(Rect(Screen.width/2-150,Screen.height/2+150, 300, 35)," + " " + '"' + nomeBotao[5] + '"' + ")){ <br>Dicionario.aux = true; <br>Dicionario.field = " + '"' + palavraChave[5] + '"' + ";<br>}<br>}<br><br>");

    resposta = confirm("Você deseja continuar?");
} while (resposta == true);