moved HKReadTextArea
This commit is contained in:
parent
e5fc0fa864
commit
9331d5bbca
3 changed files with 18 additions and 19 deletions
|
|
@ -374,3 +374,16 @@ function checkWarriorDreams(divId, dataObject, playerData) {
|
||||||
delete dataObject[i];
|
delete dataObject[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function HKReadTextArea() {
|
||||||
|
cleanHTML(DIV_ID);
|
||||||
|
|
||||||
|
let textAreaId = "save-area";
|
||||||
|
let contents = document.getElementById(textAreaId).value;
|
||||||
|
|
||||||
|
if(contents.length > 0) {
|
||||||
|
let jsonObj = JSON.parse(contents);
|
||||||
|
HKCheckCompletion(jsonObj);
|
||||||
|
// console.log(jsonObj);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -40,6 +40,7 @@
|
||||||
- Single Mask Shards locations
|
- Single Mask Shards locations
|
||||||
- Single Vessel Fragments locations
|
- Single Vessel Fragments locations
|
||||||
- Single Pale Ore locations?
|
- Single Pale Ore locations?
|
||||||
|
- Deep clone Spells object
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<div id="content">
|
<div id="content">
|
||||||
|
|
@ -60,9 +61,9 @@
|
||||||
|
|
||||||
<div style="margin-bottom: 20px;"></div>
|
<div style="margin-bottom: 20px;"></div>
|
||||||
|
|
||||||
<div>
|
<!-- <div>
|
||||||
<button id="startbutton" onclick="HKCheckCompletion(jsonObj);">Run Script</button>
|
<button id="startbutton" onclick="HKCheckCompletion(jsonObj);">Run Script</button>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<div style="margin-bottom: 20px;"></div>
|
<div style="margin-bottom: 20px;"></div>
|
||||||
|
|
||||||
|
|
|
||||||
17
loadJson.js
17
loadJson.js
|
|
@ -5,7 +5,6 @@ var jsonObj = "";
|
||||||
* @param callback Asynchronous function.
|
* @param callback Asynchronous function.
|
||||||
*/
|
*/
|
||||||
function loadJSON(callback) {
|
function loadJSON(callback) {
|
||||||
jsonObj = "";
|
|
||||||
// new Http request object (asynchronous), both the web page and the XML file it tries to load, must be located on the same server.
|
// new Http request object (asynchronous), both the web page and the XML file it tries to load, must be located on the same server.
|
||||||
var xobj = new XMLHttpRequest();
|
var xobj = new XMLHttpRequest();
|
||||||
|
|
||||||
|
|
@ -37,21 +36,7 @@ loadJSON(
|
||||||
function JSONparse(response) {
|
function JSONparse(response) {
|
||||||
// Parse JSON string into object
|
// Parse JSON string into object
|
||||||
jsonObj = JSON.parse(response);
|
jsonObj = JSON.parse(response);
|
||||||
|
document.getElementById("save-area").value = response;
|
||||||
// console.log(jsonObj);
|
// console.log(jsonObj);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
function HKReadTextArea() {
|
|
||||||
jsonObj = "";
|
|
||||||
|
|
||||||
cleanHTML(DIV_ID);
|
|
||||||
|
|
||||||
let textAreaId = "save-area";
|
|
||||||
let contents = document.getElementById(textAreaId).value;
|
|
||||||
|
|
||||||
if(contents.length > 0) {
|
|
||||||
jsonObj = JSON.parse(contents);
|
|
||||||
HKCheckCompletion(jsonObj);
|
|
||||||
// console.log(jsonObj);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in a new issue