Browse Source

Added social meta; a bit of cleaning

master
TFLCL 2 years ago
parent
commit
538f3352c3
  1. BIN
      img/social.png
  2. 22
      index.html
  3. 34
      js/main.js
  4. 24
      js/plugins.js

BIN
img/social.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

22
index.html

@ -1,16 +1,21 @@
<!doctype html>
<html class="no-js" lang="">
<html lang="en">
<head>
<meta charset="utf-8">
<title>YTDJ!</title>
<meta name="description" content="">
<title>YTDJ!🔊 Mix like a pro youtube DJ! 🎧</title>
<meta name="description" content="Mix tracks from youtube like a true DJ! Make smooth transitions, funny layerings, and make everyone dance!">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="keywords" content="dj,mixing,youtube,crossfader,transition,volume,fading,party">
<meta property="og:title" content="">
<meta property="og:type" content="">
<meta property="og:url" content="">
<meta property="og:image" content="">
<meta property="og:title" content="YTDJ!🔊 Mix like a pro youtube DJ! 🎧">
<meta property="og:type" content="website">
<meta property="og:url" content="https://dj.tflcl.xyz">
<meta property="og:image" content="https://dj.tflcl.xyz/img/social.png">
<meta name="og:image:width" content="1600">
<meta name="og:image:height" content="800">
<meta name="twitter:card" content="summary_large_card">
<meta name="twitter:image" content="https://dj.tflcl.xyz/img/social.png">
<link rel="apple-touch-icon" sizes="180x180" href="/img/icon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/icon/favicon-32x32.png">
@ -90,8 +95,9 @@
</div>
<!-- Some light analytics to know how people use this website -->
<script async defer data-website-id="8db8311f-63a6-47d5-a77f-7d9b80db22b1" src="https://stats.tflcl.xyz/sucre.js"></script>
<!-- Background was first made using P5JS -->
<!-- <script src="/js/vendor/p5.js"></script>
<script src="/js/vendor/p5.svg.js"></script>
<script src="/js/sketch.js"></script> -->

34
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');

24
js/plugins.js

@ -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.
Loading…
Cancel
Save