Merge branch 'united' into multi-gpu

This commit is contained in:
Gnome Ann 2021-10-05 09:43:20 -04:00
commit 18fa742b02
2 changed files with 22 additions and 29 deletions

View File

@ -79,7 +79,7 @@ var sman_allow_delete = false;
var sman_allow_rename = false; var sman_allow_rename = false;
// This is true iff [we're in macOS and the browser is Safari] or [we're in iOS] // This is true iff [we're in macOS and the browser is Safari] or [we're in iOS]
var using_webkit_patch = null; var using_webkit_patch = true;
// Key states // Key states
var shift_down = false; var shift_down = false;
@ -1132,33 +1132,26 @@ $(document).ready(function(){
// A simple feature detection test to determine whether the user interface // A simple feature detection test to determine whether the user interface
// is using WebKit (Safari browser's rendering engine) because WebKit // is using WebKit (Safari browser's rendering engine) because WebKit
// requires special treatment to work correctly with the KoboldAI editor // requires special treatment to work correctly with the KoboldAI editor
if(using_webkit_patch === null) { (function() {
using_webkit_patch = (function() { var active_element = document.activeElement;
try { var c = document.createElement("chunk");
var active_element = document.activeElement; var t = document.createTextNode("KoboldAI");
var c = document.createElement("chunk"); c.appendChild(t);
var t = document.createTextNode("KoboldAI"); game_text[0].appendChild(c);
c.appendChild(t); var r = rangy.createRange();
game_text[0].appendChild(c); r.setStart(t, 6);
var r = rangy.createRange(); r.collapse(true);
r.setStart(t, 6); var s = rangy.getSelection();
r.collapse(true); s.removeAllRanges();
var s = rangy.getSelection(); s.addRange(r);
s.removeAllRanges(); game_text.blur();
s.addRange(r); game_text.focus();
game_text.blur(); using_webkit_patch = rangy.getSelection().focusOffset !== 6;
game_text.focus(); c.removeChild(t);
var offset = rangy.getSelection().focusOffset; game_text[0].removeChild(c);
c.removeChild(t); document.activeElement.blur();
game_text[0].removeChild(c); active_element.focus();
document.activeElement.blur(); })();
active_element.focus();
return offset !== 6;
} catch (e) {
return false;
}
})();
}
} else if(msg.cmd == "updatescreen") { } else if(msg.cmd == "updatescreen") {
var _gamestarted = gamestarted; var _gamestarted = gamestarted;
gamestarted = msg.gamestarted; gamestarted = msg.gamestarted;

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<script src="static/jquery-3.6.0.min.js"></script> <script src="static/jquery-3.6.0.min.js"></script>
<script src="static/socket.io.min.js"></script> <script src="static/socket.io.min.js"></script>
<script src="static/application.js?ver=1.16.2d"></script> <script src="static/application.js?ver=1.16.2e"></script>
<script src="static/bootstrap.min.js"></script> <script src="static/bootstrap.min.js"></script>
<script src="static/bootstrap-toggle.min.js"></script> <script src="static/bootstrap-toggle.min.js"></script>
<script src="static/rangy-core.min.js"></script> <script src="static/rangy-core.min.js"></script>