HKReadTextArea as event after loading file

This commit is contained in:
ReznoRMichael 2021-02-15 22:56:56 +01:00
parent 552a0d9820
commit aed97eeb47
3 changed files with 10 additions and 5 deletions

File diff suppressed because one or more lines are too long

View file

@ -1173,7 +1173,7 @@ function CheckHintsTrue(divId, dataObject, playerData, worldData) {
/**
* Pre-Cleans HTML. Reads contents inside text area and parses it to a JavaScript object. If not empty, runs HKCheckCompletion() to check data.
*/
export function HKReadTextArea(textAreaId = "") {
function HKReadTextArea(textAreaId = "") {
// refresh and prepare document for filling with data from the save
InitialHTMLPopulate(HK.DIV_ID);
@ -1454,6 +1454,8 @@ function TranslateMapName(mapCode, dictionary = MAP) {
return translation;
}
export { HKReadTextArea };
// Make functions global so they can be used on click and change events (for Webpack)
// window.InitialHTMLPopulate = InitialHTMLPopulate;

View file

@ -8,6 +8,8 @@
// AES JS for file decryption
const aesjs = require("./aes-js.js");
// For reading the text area after save decoding
import { HKReadTextArea } from "./HKCheckCompletion.js";
const CSHARP_HEADER = [0, 1, 0, 0, 0, 255, 255, 255, 255, 1, 0, 0, 0, 0, 0, 0, 0, 6, 1, 0, 0, 0]; // 22 bytes