Add SFX and JS functions

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
Macintxsh 2024-05-02 01:56:10 +05:00
parent 1cd1d5615b
commit e3625a31cf
Signed by: mctaylors
GPG key ID: 7181BEBE676903C1
4 changed files with 18 additions and 2 deletions

13
assets/js/main.js Normal file
View file

@ -0,0 +1,13 @@
window.onload = function() {
play("error");
};
function play(audio) {
var audio = document.getElementById(audio);
audio.play();
};
async function ok_button(href) {
play("click");
window.location.href = href;
};

BIN
assets/wav/click.wav Executable file

Binary file not shown.

BIN
assets/wav/error.wav Executable file

Binary file not shown.

View file

@ -1,9 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>NXInspired</title>
<link rel="stylesheet" href="/assets/css/style.css" />
<meta charset="utf-8" />
<script type="text/javascript" src="/assets/js/main.js"></script>
<audio id="click" src="/assets/wav/click.wav"></audio>
<audio id="error" src="/assets/wav/error.wav"></audio>
</head>
<body>
<div class="background-image"></div>
@ -16,7 +19,7 @@
<br/>
Server cannot find the requested resource. Make sure the link is spelled correctly.
</p>
<button>
<button onclick="ok_button('https://github.com/mctaylors/NXInspired')">
OK
</button>
</div>