hotfix broken editor shortcuts

This commit is contained in:
Olivier Gagnon
2021-08-21 01:54:39 -04:00
parent ee5a70901b
commit b67c03ff8a
5 changed files with 26 additions and 23 deletions
-13
View File
@@ -28,19 +28,6 @@ import { dialogBoxCreate } from "../../utils/DialogBox";
import { compareArrays } from "../../utils/helpers/compareArrays";
import { createElement } from "../../utils/uiHelpers/createElement";
// TODO(hydroflame): move to Monaco mount/unmount
//Define key commands in script editor (ctrl o to save + close, etc.)
$(document).keydown(function(e) {
if (Settings.DisableHotkeys === true) {return;}
if (routing.isOn(Page.ScriptEditor)) {
//Ctrl + b
if (e.keyCode == 66 && (e.ctrlKey || e.metaKey)) {
e.preventDefault();
saveAndCloseScriptEditor(); // deleted function
}
}
});
export function scriptCalculateOfflineProduction(runningScriptObj) {
//The Player object stores the last update time from when we were online
const thisUpdate = new Date().getTime();