rem: } else if (event.keyCode == 38 && !event.altKey) { var history = document.getElementById("history"); if (historyIndex == -1) storedInput = inputElement.innerText; var historyArray = history.childNodes; var historySize = historyArray.length - 1; if (historyIndex < historySize) { historyIndex++; var item = historyArray[historySize - historyIndex].childNodes[0]; while(item.className.indexOf("expression") == -1) { historyIndex++; item = historyArray[historySize - historyIndex].childNodes[0]; } inputElement.innerText = item.innerText; } 
add: } else if (event.keyCode == 38 && !event.altKey && historyIndex > 0) { historyIndex--; inputElement.innerText = history[historyIndex]; inputElement.focus() 
context: function inputKeyDown(event){    if (event.keyCode == 13 && !event.altKey) {        if (mainWindow.isPaused() && mainWindow.currentStack) {            sendScript(inputElement.innerText);            inputElement.innerText = "";            inputElement.focus();        } else            alert("The debugger needs to be paused.\tIn order to evaluate your script input you need to pause the debugger in the context of another script.");        event.preventDefault();    } else if (event.keyCode == 38 && !event.altKey) {        var history = document.getElementById("history");        if (historyIndex == -1)            storedInput = inputElement.innerText;        var historyArray = history.childNodes;        var historySize = historyArray.length - 1;        if (historyIndex < historySize) {            historyIndex++;            var item = historyArray[historySize - historyIndex].childNodes[0];            while(item.className.indexOf("expression") == -1) {                historyIndex++;                item = historyArray[historySize - historyIndex].childNodes[0];            }            inputElement.innerText = item.innerText;        }        event.preventDefault();    } else if (event.keyCode == 40 && !event.altKey) {        if (historyIndex >= 0) {            var history = document.getElementById("history");            historyIndex--;            if (historyIndex == -1)                inputElement.innerText = storedInput;            else {                var historyArray = history.childNodes;                var historySize = historyArray.length - 1;                var item = historyArray[historySize - historyIndex].childNodes[0];                while(item.className.indexOf("expression") == -1) {                    historyIndex--;                    item = historyArray[historySize - historyIndex].childNodes[0];                }                inputElement.innerText = item.innerText;            }        }        event.preventDefault();    }}
meta: 5650	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5650/168cb95b7b4179c566b18084b2f5576271fdbc81/console.js/buggy/WebKitTools/Drosera/console.js