wyattjmiller.com/src/main.js

27 lines
887 B
JavaScript
Raw Normal View History

2018-05-18 06:38:59 -05:00
/*
main.js, for all global functions throughout the site
Created by Wyatt J. Miller, published by Entourage Solutions
Hey there, nice to see you! There's nothing here so why don't you fuck off??
*/
function mediaDetect(){
var ScreenWidth = window.screen.width;
var ScreenHeight = window.screen.height;
console.log("width: " + ScreenWidth);
console.log("height: " + ScreenHeight);
if (ScreenWidth < 768){
console.log("user has a phone!");
} else if (ScreenWidth < 992) {
console.log("user has a tablet!");
} else if (ScreenWidth < 1200) {
console.log("user has a desktop!");
} else if (ScreenWidth < 2048) {
console.log("user has a hd display!");
} else if (ScreenWidth < 4096) {
console.log("user has a display greater than fhd!");
} else {
console.log("what do you spend your money on?")
}
}