Skip to content

Commit 845d3ac

Browse files
committed
Contact Page + API Fix
Added a small contact me section.
1 parent b839197 commit 845d3ac

File tree

7 files changed

+39
-8
lines changed

7 files changed

+39
-8
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules/
22
index_old.html
3+
app-env

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ Node.js
2626

2727
Express
2828

29+
YouTube Data API V3
30+
2931
---
3032

3133
### How to run locally
@@ -37,6 +39,9 @@ Install Dependencies
3739
npm install
3840
```
3941

42+
Obtain API keys for YouTube Data API V3 and Dailymotion SDK (Optional) and
43+
source it to your path as YT3_API_KEY and DM_API_KEY respectively
44+
4045
Run the server
4146
```
4247
node server

index.html

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@
5555
<li class="nav-item">
5656
<a class="nav-link js-scroll-trigger" href="#about">About</a>
5757
</li>
58+
<li class="nav-item">
59+
<a class="nav-link js-scroll-trigger" href="#contact">Contact</a>
60+
</li>
5861
<li class="nav-item">
5962
<a class="nav-link js-scroll-trigger" href="https://github.com/kyle8998/Vynchronize">Source Code</a>
6063
</li>
@@ -337,7 +340,25 @@ <h2>About Vynchronize</h2>
337340
</div>
338341
</div>
339342
</section>
340-
<hr style="height:120pt; visibility:hidden;" />
343+
<hr style="height:20pt; visibility:hidden;" />
344+
345+
<section id="contact" class="bg-light">
346+
<hr style="height:100pt; visibility:hidden;" />
347+
348+
<div class="container">
349+
<div class="row">
350+
<div class="col-lg-8 mx-auto">
351+
<h2>Contact Me</h2>
352+
<p class="lead">Who Am I</p>
353+
<p> I'm Kyle! A student and developer just trying build software for the everyday user! I developed Vynchronize because it was a problem that I needed to solve myself, and now I continue to build it for the those who enjoy using it! :)</p>
354+
<p> You can contact me directly at <a href="mailto:[email protected]?Subject=Vynchronize">[email protected]</a> if you have any questions, concerns, or just to say hi! If you want to submit a suggestion, please see the github issues page.</p>
355+
<p> Also I want to keep the website up and running with an ad-free experience because I hate ads too! I'm currently paying for servers and a domain, but they are expensive to a broke college kid. If you would like to donate click below! I appreciate the support!</p>
356+
<a href="https://www.paypal.me/kylelim"><button style="margin-top:.5rem" class="btn btn-primary"><i class="far fa-heart"></i> Donate</button></a>
357+
</div>
358+
</div>
359+
</div>
360+
</section>
361+
<hr style="height:50pt; visibility:hidden;" />
341362

342363
</div>
343364
</div>

js/dm.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ var dailyPlayer
22

33
setTimeout(function() {
44
DM.init({
5-
apiKey: '1e81e2b5ea5ab3dd737a',
65
status: false, // check login status
76
cookie: true // enable cookies to allow the server to access the session
87
});

js/sync.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,17 +264,19 @@ function loveLive(roomnum) {
264264
// love live, love4eva, why, gee, what is love, stay, starlight, bad boy
265265
// likey, spring love, palette, roller coaster, DNA, I, peekaboo, wee woo
266266
// rookie, russian roulette, i want you back, TT, whistle, ddu du ddu du, turtle, 24/7
267+
// something new
267268
var video_roulette = [
268269
'97uviVyw0_o', 'tIWpr3tHzII', 'WkdtmT8A2iY', 'U7mPqycQ0tQ',
269270
'i0p1bmr0EmE', 'FzVR_fymZw4', 'eNmL4JiGxZQ', 'J_CFBjAyPWE',
270271
'V2hlQkVJZhE', 'erErBFKPbMY', 'd9IxdwEFk1c', '900X9fDFLc4',
271272
'MBdVXkSdhwU', '4OrCA1OInoo', '6uJf2IT2Zh8', 'wLfHuClrQdI',
272273
'J0h8-OTC38I', 'QslJYDX3o8s', 'X3H-4crGD6k', 'ePpPVE-GGJw',
273-
'dISNgvVpWlo', 'IHNzOHi8sJs', 'sErJjrLswEw', '-j6XPEUKzn0'
274+
'dISNgvVpWlo', 'IHNzOHi8sJs', 'sErJjrLswEw', '-j6XPEUKzn0',
275+
'im1UUY8dQIk'
274276
]
275277

276-
// Random number between 0 and 23
277-
var random = Math.floor(Math.random() * (24))
278+
// Random number between 0 and 24
279+
var random = Math.floor(Math.random() * (25))
278280
// Only for YouTube testing
279281
socket.emit('change video', {
280282
room: roomnum,

js/yt.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ tag.id = 'iframe-demo';
33
tag.src = 'https://www.youtube.com/iframe_api';
44
var firstScriptTag = document.getElementsByTagName('script')[0];
55
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
6-
yt3_api = 'AIzaSyCEc0w2faZFftIynhOfjUSW8YIQDFPBMkI'
76

87
var player;
98

@@ -103,7 +102,7 @@ socket.on('get title', function(data, callback) {
103102
"https://www.googleapis.com/youtube/v3/videos", {
104103
part: 'snippet',
105104
id: videoId,
106-
key: yt3_api
105+
key: data.api_key
107106
},
108107
function(data) {
109108
// enqueueNotify(user, data.items[0].snippet.title)

server.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ rooms = [];
88
// Store all of the sockets and their respective room numbers
99
userrooms = {}
1010

11+
YT3_API_KEY = process.env.YT3_API_KEY
12+
DM_API_KEY = process.env.DM_API_KEY
13+
1114
// Set given room for url parameter
1215
var given_room = ""
1316

@@ -158,7 +161,8 @@ io.sockets.on('connection', function(socket) {
158161
// See yt.js file
159162
socket.emit('get title', {
160163
videoId: videoId,
161-
user: user
164+
user: user,
165+
api_key: YT3_API_KEY
162166
}, function(data) {
163167
videoId = data.videoId
164168
title = data.title

0 commit comments

Comments
 (0)