diff --git a/img/social.png b/img/social.png new file mode 100644 index 0000000..6396be4 Binary files /dev/null and b/img/social.png differ diff --git a/index.html b/index.html index 2664b86..9340d1b 100644 --- a/index.html +++ b/index.html @@ -1,16 +1,21 @@ - + - YTDJ! - + YTDJ!🔊 Mix like a pro youtube DJ! 🎧 + + - - - - + + + + + + + + @@ -90,8 +95,9 @@ - + + diff --git a/js/main.js b/js/main.js index e3c4a93..590ab63 100644 --- a/js/main.js +++ b/js/main.js @@ -1,4 +1,4 @@ -// Loads the IFrame Player API code asynchronously. +// Loads the Youtube IFrame Player API code asynchronously. let tag = document.createElement('script'); tag.src = 'https://www.youtube.com/iframe_api'; let firstScriptTag = document.getElementsByTagName('script')[0]; @@ -213,14 +213,36 @@ function fetch_bandcamp_url(url) { console.log('scrap: ' + scrap); } +// Thumbnails: https://i1.ytimg.com/vi/{trackID}/mqdefault.jpg + +// Converts values from 0-255 to 00-ff function componentToHex(c) { var hex = c.toString(16); return hex.length == 1 ? "0" + hex : hex; } -// Thumbnails: https://i1.ytimg.com/vi/{trackID}/mqdefault.jpg -let bcURL = 'https://clett.bandcamp.com/track/placenta'; +// ----------------------------------- +// BANDCAMP Tests +// ----------------------------------- +// let bcURL = 'https://clett.bandcamp.com/track/placenta'; +// let request = new Request(bcURL); +// let headers = new Headers({ +// 'X-Requested-With': 'com.bandcamp.android', +// 'Content-Type': 'application/json', +// 'User-Agent': 'Dalvik/2.1.0 (Linux; U; Android 9; Unknown Device)', +// 'Host': 'bandcamp.com', +// }); +// +// let data; +// fetch(bcURL, { +// method: 'GET', +// headers: headers +// }) +// .then(response => response.json()) +// .then(data => console.log('data: ' + data)); +// console.log('response: ' + data); +// console.log('data: ' + data); // let html = async await fetch(bcURL).text(); // html as text // let doc = new DOMParser().parseFromString(html, 'text/html'); // doc.title; doc.body; @@ -233,6 +255,11 @@ let bcURL = 'https://clett.bandcamp.com/track/placenta'; // console.log(Http.responseText) // } + + +// ----------------------------------- +// BACKGROUND +// ----------------------------------- let areStarsShooting = true; let shootingStarWrapper = document.getElementsByClassName('shooting-stars-wrapper')[0]; let shootingStar; @@ -299,6 +326,7 @@ document.getElementById('shooting-stars-enable').addEventListener('click', () => }); + // Enable/disable shooting stars (with P5JS background) // if (typeof processingSketch !== 'undefined') { // let separatorSpan = document.createElement('span'); diff --git a/js/plugins.js b/js/plugins.js deleted file mode 100644 index feb7d19..0000000 --- a/js/plugins.js +++ /dev/null @@ -1,24 +0,0 @@ -// Avoid `console` errors in browsers that lack a console. -(function() { - var method; - var noop = function () {}; - var methods = [ - 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', - 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', - 'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd', - 'timeline', 'timelineEnd', 'timeStamp', 'trace', 'warn' - ]; - var length = methods.length; - var console = (window.console = window.console || {}); - - while (length--) { - method = methods[length]; - - // Only stub undefined methods. - if (!console[method]) { - console[method] = noop; - } - } -}()); - -// Place any jQuery/helper plugins in here.