Add SFX and JS functions
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
parent
1cd1d5615b
commit
e3625a31cf
4 changed files with 18 additions and 2 deletions
13
assets/js/main.js
Normal file
13
assets/js/main.js
Normal 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
BIN
assets/wav/click.wav
Executable file
Binary file not shown.
BIN
assets/wav/error.wav
Executable file
BIN
assets/wav/error.wav
Executable file
Binary file not shown.
|
@ -1,9 +1,12 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
<title>NXInspired</title>
|
<title>NXInspired</title>
|
||||||
<link rel="stylesheet" href="/assets/css/style.css" />
|
<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>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="background-image"></div>
|
<div class="background-image"></div>
|
||||||
|
@ -16,7 +19,7 @@
|
||||||
<br/>
|
<br/>
|
||||||
Server cannot find the requested resource. Make sure the link is spelled correctly.
|
Server cannot find the requested resource. Make sure the link is spelled correctly.
|
||||||
</p>
|
</p>
|
||||||
<button>
|
<button onclick="ok_button('https://github.com/mctaylors/NXInspired')">
|
||||||
OK
|
OK
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue