Skip to content

Commit

Permalink
remove unused variable "fuck" + make ver.js return JSON with informat…
Browse files Browse the repository at this point in the history
…ion for every file.
  • Loading branch information
DexrnZacAttack committed Apr 9, 2024
1 parent 0778301 commit e6ebb48
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 4 deletions.
3 changes: 3 additions & 0 deletions QMGHeaderParser/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,7 @@
fadeBG(true);
</script>
</body>
<script>
setVer("qd");
</script>
</html>
3 changes: 3 additions & 0 deletions SGExtractor/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,7 @@ <h3>NOTE: This is unfinished UX/UI wise.</h3>
fadeBG(true);
</script>
</body>
<script>
setVer("le");
</script>
</html>
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -418,4 +418,7 @@ <h3 id="themetxt"></h3>
<a rel="me" href="https://wetdry.world/@zach"
style="display:none;">Mastodon</a>
</body>
<script>
setVer("default");
</script>
</html>
1 change: 0 additions & 1 deletion js/LCEExtractor.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ document.addEventListener("drop", (e) => {
}
});

let fuck = 0;
let compressionMode = "none";

/**
Expand Down
31 changes: 28 additions & 3 deletions js/ver.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,32 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

const updDate = "04/08/2024"
const verString = "v1.2.51"
/**
* Retrieves version info for the specified file.
* @param {string} type - The file to return info for.
* @returns {string} - A JSON string containing the version and date information.
*/
function getVer(type) {
switch (type) {
case "le":
// LCE Savegame Extractor
return JSON.stringify({ "version": "1.1.10", "date": "04/08/2024"});
case "qd":
// QMG Header Parser
return JSON.stringify({ "version": "1.2.10", "date": "12/21/2023"});
case "default":
default:
return JSON.stringify({ "version": "1.2.52", "date": "04/09/2024"});
}
}

/**
* Sets the version information in the current HTML.
* @param {string} type - The file to use the information from when setting the info.
* @returns {void}
*/
function setVer(type) {
let json = JSON.parse(getVer(type));
document.getElementById('lastUpdated').innerText = `v${json["version"]} (${json["date"]})`;
}

document.getElementById('lastUpdated').innerText = `${updDate} (${verString})`

0 comments on commit e6ebb48

Please sign in to comment.