mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Update for $el
This commit is contained in:
@@ -97,9 +97,7 @@ const context_menu_actions = [
|
||||
// {label: "View Token Probabilities", icon: "account_tree", visibilityCondition: "SELECTION", click: view_selection_probabilities},
|
||||
];
|
||||
|
||||
// Elements
|
||||
const titleInput = document.querySelector(".var_sync_story_story_name");
|
||||
|
||||
function $el(selector) { return document.querySelector(selector); }
|
||||
|
||||
const map1 = new Map()
|
||||
map1.set('Top K Sampling', 0)
|
||||
@@ -4415,12 +4413,13 @@ function position_context_menu(contextMenu, x, y) {
|
||||
}
|
||||
|
||||
function updateTitle() {
|
||||
const titleInput = $el(".var_sync_story_story_name");
|
||||
if (!titleInput.innerText) return;
|
||||
document.title = `${titleInput.innerText} - KoboldAI Client`;
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
on_colab = document.getElementById("on_colab").textContent == "true";
|
||||
on_colab = $el("#on_colab").textContent == "true";
|
||||
|
||||
if (colab_cookies != null) {
|
||||
for (const cookie of Object.keys(colab_cookies)) {
|
||||
@@ -4686,6 +4685,7 @@ $(document).ready(function(){
|
||||
highlightEl(wiCard);
|
||||
});
|
||||
|
||||
const titleInput = $el(".var_sync_story_story_name");
|
||||
titleInput.addEventListener("input", updateTitle);
|
||||
titleInput.addEventListener("sync", updateTitle);
|
||||
|
||||
|
@@ -22,7 +22,7 @@
|
||||
<meta charset="utf-8">
|
||||
<link href="themes/Monochrome.css" rel="stylesheet" id="CSSTheme">
|
||||
<link href="static/koboldai.css" rel="stylesheet">
|
||||
<script src="static/koboldai.js"></script>
|
||||
<script defer src="static/koboldai.js"></script>
|
||||
<script defer src="static/favicon.js"></script>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
</head>
|
||||
|
Reference in New Issue
Block a user