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() {
|
function reset_story() {
|
||||||
console.log("Resetting story");
|
console.log("Resetting story");
|
||||||
var story_area = document.getElementById('Selected Text');
|
var story_area = document.getElementById('Selected Text');
|
||||||
while (story_area.firstChild) {
|
while (story_area.lastChild.id != 'story_prompt') {
|
||||||
story_area.removeChild(story_area.firstChild);
|
story_area.removeChild(story_area.lastChild);
|
||||||
}
|
}
|
||||||
var option_area = document.getElementById("Select Options");
|
var option_area = document.getElementById("Select Options");
|
||||||
while (option_area.firstChild) {
|
while (option_area.firstChild) {
|
||||||
@@ -992,6 +992,8 @@ function update_token_lengths() {
|
|||||||
}
|
}
|
||||||
max_chunk = -1;
|
max_chunk = -1;
|
||||||
for (item of document.getElementById("Selected Text").childNodes) {
|
for (item of document.getElementById("Selected Text").childNodes) {
|
||||||
|
console.log(item);
|
||||||
|
if (item.id != undefined) {
|
||||||
if (item.id != "story_prompt") {
|
if (item.id != "story_prompt") {
|
||||||
chunk_num = parseInt(item.id.replace("Selected Text Chunk ", ""));
|
chunk_num = parseInt(item.id.replace("Selected Text Chunk ", ""));
|
||||||
if (chunk_num > max_chunk) {
|
if (chunk_num > max_chunk) {
|
||||||
@@ -999,6 +1001,7 @@ function update_token_lengths() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (var chunk=max_chunk;chunk >= 0;chunk--) {
|
for (var chunk=max_chunk;chunk >= 0;chunk--) {
|
||||||
current_chunk_length = parseInt(document.getElementById("Selected Text Chunk "+chunk).getAttribute("token_length"));
|
current_chunk_length = parseInt(document.getElementById("Selected Text Chunk "+chunk).getAttribute("token_length"));
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
<div class="menubar3"></div>
|
<div class="menubar3"></div>
|
||||||
</div>
|
</div>
|
||||||
<!------------ Game Text Screen--------------------->
|
<!------------ Game Text Screen--------------------->
|
||||||
<div class="gamescreen rawtext" id="gamescreen">
|
<div class="gamescreen" id="gamescreen">
|
||||||
<div class="gametext" id="Selected Text">
|
<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>
|
<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>
|
</div>
|
||||||
|
Reference in New Issue
Block a user