Skip to content

Instantly share code, notes, and snippets.

View Quellens's full-sized avatar
🎓
Working from home (selftaught)

Quellensa Quellens

🎓
Working from home (selftaught)
View GitHub Profile
@Quellens
Quellens / detectTabs.js
Created August 4, 2020 17:41
This script detects wheter the User is going away from your website or not. If you set the Title in HTML, this title will be the first that the user sees. Then => document.title = 'Hey! Come back!' Then => document.title = 'Nice to See you again! 😄';
//If you set the Title in HTML, this title will be the first that the user sees. Then => document.title = 'Hey! Come back!' Then => document.title = 'Nice to See you again! 😄';
addEventListener('blur', () => {
document.title = 'Hey! Come back!';
});
addEventListener('focus', () => {
document.title = 'Nice to See you again! 😄';
});

My Websites

This is my first website, a website for my YT-Channel. Every youtuber and streamer who I had cutted a video for (Best Ofs) are listed. My YT-Channel is in german.

Riggler Scud is a mini-game/browser-game where your reaction speed is required. It was made for the Nintendo-Youtuber Dävid. It is a new version of my old game 'Rounded Leap'.

@Quellens
Quellens / MobileDeviceBoolean.js
Last active August 4, 2020 15:27
This bool is true if the user has clicked the website on tablets, smartphones etc..
var mobiledevice = ((typeof window.orientation !== "undefined") || (navigator.userAgent.indexOf('IEMobile') !== -1));
if(mobiledevice){
//do something different
}
// OR use the maxTouchPoints-method
mobiledevice = navigator.maxTouchPoints > 0;