Reorganized files and folders

This commit is contained in:
ReznoRMichael 2020-10-21 21:16:38 +02:00
parent 966c6a05d4
commit 901cf7ffb5
6 changed files with 23 additions and 22 deletions

1
.gitignore vendored
View file

@ -1,4 +1,5 @@
fontello/
images/
save/
files/
config.json

View file

@ -50,7 +50,7 @@ body {
::-webkit-scrollbar-track,
::-webkit-scrollbar-track-piece {
background: url("img/scrollbar-track.png") repeat-y !important;
background: url("../img/scrollbar-track.png") repeat-y !important;
}
::-webkit-resizer {
@ -66,7 +66,7 @@ body {
left: 0;
width: 100%;
height: 100%;
background-image: url("img/hk-background.jpg");
background-image: url("../img/hk-background.jpg");
background-size: auto 100%;
background-position: center top;
background-repeat: no-repeat;
@ -172,7 +172,7 @@ p {
margin: 1rem 0;
height: 1.5rem;
width: 100%;
background-image: url("img/fleur-divide.png");
background-image: url("../img/fleur-divide.png");
background-size: auto 100%;
background-position: center top;
background-repeat: no-repeat;

View file

Before

Width:  |  Height:  |  Size: 380 KiB

After

Width:  |  Height:  |  Size: 380 KiB

View file

@ -7,7 +7,7 @@
<link href="favicon.png" rel="icon">
<link href="https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;700&display=swap" rel="stylesheet">
<link href="css/fontello.css" rel="stylesheet">
<link href="style.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<title>Hollow Knight: Analyze Save Completion</title>
<meta name="description" content="A simple open source tool for checking what you missed for your Game Completion Percentage.">
<meta name="keywords" content="hollow knight, tool, online, save, game, completion, check, checker, percentage, percent, left">
@ -16,14 +16,14 @@
<meta property="og:type" content="website">
<meta property="og:title" content="Hollow Knight: Analyze Save Completion">
<meta property="og:description" content="A simple open source tool for checking what you missed for your Game Completion Percentage.">
<meta property="og:image" content="http://reznortech.rf.gd/hollow-knight-completion/thumbnail1200x628.jpg">
<meta property="og:image" content="http://reznortech.rf.gd/hollow-knight-completion/img/thumbnail1200x628.jpg">
<meta property="og:url" content="http://reznortech.rf.gd/hollow-knight-completion/">
<!-- Twitter -->
<meta property="twitter:title" content="Hollow Knight: Analyze Save Completion">
<meta property="twitter:description" content="A simple open source tool for checking what you missed for your Game Completion Percentage.">
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:image" content="http://reznortech.rf.gd/hollow-knight-completion/thumbnail1200x628.jpg">
<meta property="twitter:image" content="http://reznortech.rf.gd/hollow-knight-completion/img/thumbnail1200x628.jpg">
<meta property="twitter:url" content="http://reznortech.rf.gd/hollow-knight-completion/">
<meta name="author" content="ReznoR Michael">
@ -32,7 +32,6 @@
<!-- To do:
- Upload a save file directly (option)
- Maps found (count)
- Hunter's Journal completion
- Censored names H***** when not defeated/found?
-->
@ -93,10 +92,10 @@
</html>
<!-- Instantly load test file (Debugging script) -->
<!-- <script src="loadJson.js"></script> -->
<!-- <script src="js/LoadJson.js"></script> -->
<!-- Main script -->
<script src="HKCheckCompletion.js"></script>
<script src="js/HKCheckCompletion.js"></script>
<!-- Populate HTML at load (before img and css) -->
<script>

View file

@ -18,9 +18,9 @@ var fileName = [
/**
* Reads the .json file and parses it to a JS object (jsonObj).
* @param callback Asynchronous function.
* @param callback Function to be called when the request completes
*/
function loadJSON(filename, callback) {
function LoadJSON(filename, callback) {
// 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();
@ -39,18 +39,19 @@ function loadJSON(filename, callback) {
if (xobj.readyState == 4 && xobj.status == "200") {
// Required use of an anonymous callback as .open will NOT return a value but simply returns undefined in asynchronous mode
// Returns the response data as a string
callback(xobj.responseText);
}
return callback(xobj.responseText);
} else return false;
};
// Sends the request to the server - Used for GET requests
xobj.send(null);
}
loadJSON("save/" + fileName[5],
function JSONparse(response) {
// Parse JSON string into object
jsonObj = JSON.parse(response);
let jsonObject = JSON.parse(response);
document.getElementById("save-area").value = response;
return jsonObject;
// console.log(jsonObj);
}
);
jsonObj = LoadJSON("../save/" + fileName[5], JSONparse(response));