read JSON file from textarea
This commit is contained in:
parent
10b22b521e
commit
80a4f10e70
2 changed files with 20 additions and 3 deletions
|
|
@ -40,7 +40,6 @@
|
||||||
- Single Mask Shards locations
|
- Single Mask Shards locations
|
||||||
- Single Vessel Fragments locations
|
- Single Vessel Fragments locations
|
||||||
- Single Pale Ore locations?
|
- Single Pale Ore locations?
|
||||||
- Read JSON file from text input
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<div id="content">
|
<div id="content">
|
||||||
|
|
@ -62,7 +61,7 @@
|
||||||
<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>
|
||||||
|
|
|
||||||
18
loadJson.js
18
loadJson.js
|
|
@ -39,3 +39,21 @@ loadJSON(
|
||||||
// console.log(jsonObj);
|
// console.log(jsonObj);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
function HKReadTextArea() {
|
||||||
|
let textAreaId = "save-area";
|
||||||
|
let contents = document.getElementById(textAreaId).value;
|
||||||
|
|
||||||
|
if(contents.length > 0) {
|
||||||
|
jsonObj = contents;
|
||||||
|
|
||||||
|
loadJSON(
|
||||||
|
function JSONparse(response) {
|
||||||
|
// Parse JSON string into object
|
||||||
|
jsonObj = JSON.parse(response);
|
||||||
|
HKCheckCompletion(jsonObj);
|
||||||
|
// console.log(jsonObj);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue