mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Scroll Test
This commit is contained in:
@@ -38,8 +38,8 @@ function disconnect() {
|
||||
function reset_story() {
|
||||
console.log("Resetting story");
|
||||
var story_area = document.getElementById('Selected Text');
|
||||
while (story_area.firstChild) {
|
||||
story_area.removeChild(story_area.firstChild);
|
||||
while (story_area.lastChild.id != 'story_prompt') {
|
||||
story_area.removeChild(story_area.lastChild);
|
||||
}
|
||||
var option_area = document.getElementById("Select Options");
|
||||
while (option_area.firstChild) {
|
||||
@@ -992,10 +992,13 @@ function update_token_lengths() {
|
||||
}
|
||||
max_chunk = -1;
|
||||
for (item of document.getElementById("Selected Text").childNodes) {
|
||||
if (item.id != "story_prompt") {
|
||||
chunk_num = parseInt(item.id.replace("Selected Text Chunk ", ""));
|
||||
if (chunk_num > max_chunk) {
|
||||
max_chunk = chunk_num;
|
||||
console.log(item);
|
||||
if (item.id != undefined) {
|
||||
if (item.id != "story_prompt") {
|
||||
chunk_num = parseInt(item.id.replace("Selected Text Chunk ", ""));
|
||||
if (chunk_num > max_chunk) {
|
||||
max_chunk = chunk_num;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -32,7 +32,7 @@
|
||||
<div class="menubar3"></div>
|
||||
</div>
|
||||
<!------------ Game Text Screen--------------------->
|
||||
<div class="gamescreen rawtext" id="gamescreen">
|
||||
<div class="gamescreen" id="gamescreen">
|
||||
<div class="gametext" id="Selected Text">
|
||||
<span id="story_prompt" class="var_sync_story_prompt var_sync_alt_story_prompt_length rawtext" contenteditable=true onchange="sync_to_server(this);" onkeydown="detect_enter_text"></span>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user