Skip to content
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions css/main.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import url('https://fonts.googleapis.com/css?family=VT323');

body {
pointer-events: none;
cursor: none;
Expand Down
23 changes: 8 additions & 15 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://opengraphprotocol.org/schema/" lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=VT323&display=swap">
<title>Jadoo 👽💻</title>
<meta name="description" content="Use this replica computer interface to call Jadoo from Koi Mil Gaya.">
<meta name="author" content="Arjun Munji">
Expand All @@ -15,6 +19,8 @@
<meta property="og:type" content="article"/>

<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/ellipse.css">
<link rel="stylesheet" href="css/wave.css">
<link rel="icon" type="image/png" href="assets/favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="assets/favicon-16x16.png" sizes="16x16" />
</head>
Expand Down Expand Up @@ -316,21 +322,8 @@ <h1>press enter to continue</h1>
<audio data-key="69" src="assets/E.mp3"></audio>
<audio data-key="70" src="assets/F.mp3"></audio>

<script type="text/javascript" src="js/crt.js"></script>
<script type="text/javascript">
function playAudio (e) {
const audio = document.querySelector(`audio[data-key="${e.keyCode}"]`);
const key = document.querySelector(`.key[data-key="${e.keyCode}"]`);
if (!audio) return; //exits the function altogether
audio.currentTime = 0; //resets the playhead
audio.play();
}
window.addEventListener('keydown', playAudio);
onLoad();
</script>
<link rel="stylesheet" href="css/ellipse.css">
<link rel="stylesheet" href="css/wave.css">
<link rel="stylesheet" href="css/main.css">
<script src="js/crt.js" defer></script>
<script src="js/main.js" defer></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
Expand Down
9 changes: 9 additions & 0 deletions js/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
function playAudio (e) {
const audio = document.querySelector(`audio[data-key="${e.keyCode}"]`);
const key = document.querySelector(`.key[data-key="${e.keyCode}"]`);
if (!audio) return; //exits the function altogether
audio.currentTime = 0; //resets the playhead
audio.play();
}
window.addEventListener('keydown', playAudio);
onLoad();