@ -1,3 +1,19 @@
// Check if client is using a mobile phone
const getMobileOS = ( ) => {
const ua = navigator . userAgent
if ( /android/i . test ( ua ) ) {
return "Android"
}
else if ( /iPad|iPhone|iPod/ . test ( ua ) || ( navigator . platform === 'MacIntel' && navigator . maxTouchPoints > 1 ) ) {
return "iOS"
}
return "Other"
}
const isRunningOn = getMobileOS ( ) ;
if ( isRunningOn != 'Other' ) {
alert ( 'Whoop, it seems that you attempt to access this website on a ' + isRunningOn + ' mobile/tablet, which might not work properly. You should better use a computer instead.' ) ;
}
// Loads the Youtube IFrame Player API code asynchronously.
// Loads the Youtube IFrame Player API code asynchronously.
let tag = document . createElement ( 'script' ) ;
let tag = document . createElement ( 'script' ) ;
tag . src = 'https://www.youtube.com/iframe_api' ;
tag . src = 'https://www.youtube.com/iframe_api' ;
@ -314,21 +330,9 @@ function newShootingStar() {
} , duration ) ;
} , duration ) ;
// setTimeout('newShootingStar()', duration + nextIn);
// setTimeout('newShootingStar()', duration + nextIn);
}
}
// function endShootingStar(el) {
// el.remove();
// console.log('removed!');
// let nextIn = 4000;
// setTimeout('newShootingStar()', nextIn);
// }
newShootingStar ( ) ;
newShootingStar ( ) ;
hsnqK2yJ8D66haK
// Enable/disable shooting stars
// let separatorSpan = document.createElement('span');
// separatorSpan.innerHTML = ' - ';
// document.getElementById('shooting-stars-enable').after(separatorSpan);
document . getElementById ( 'shooting-stars-enable' ) . innerHTML = '⭐️ Disable shooting stars⭐️ ' ;
document . getElementById ( 'shooting-stars-enable' ) . innerHTML = '⭐️ Disable shooting stars⭐️ ' ;
document . getElementById ( 'shooting-stars-enable' ) . addEventListener ( 'click' , ( ) => {
document . getElementById ( 'shooting-stars-enable' ) . addEventListener ( 'click' , ( ) => {