might be broken, added some js and modified a few things
This commit is contained in:
commit
a4882bc7c0
@ -1,7 +1,6 @@
|
||||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es6": true
|
||||
"browser": true
|
||||
},
|
||||
"extends": "eslint:recommended",
|
||||
"rules": {
|
||||
@ -20,6 +19,12 @@
|
||||
"semi": [
|
||||
"error",
|
||||
"always"
|
||||
],
|
||||
"no-undef": [
|
||||
"warn"
|
||||
],
|
||||
"no-unused-vars": [
|
||||
"warn"
|
||||
]
|
||||
}
|
||||
}
|
5
.gitignore
vendored
5
.gitignore
vendored
@ -1 +1,6 @@
|
||||
vendor
|
||||
.vscode
|
||||
composer.json
|
||||
composer.lock
|
||||
.eslintrc.json
|
||||
|
||||
|
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"lua.targetVersion": "5.3"
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
# Licensed by the MIT
|
||||
#
|
||||
# Copying files in the dockerfile is kind of a mess. Actually not really.
|
||||
# Just remember when linking files, follow the method below.
|
||||
# Just remember when linking files in code, follow the method below.
|
||||
FROM php:7.0-apache
|
||||
RUN /bin/bash -c "cd /var/www/html && mkdir assets && mkdir css && mkdir img && mkdir webfonts"
|
||||
COPY src/ /var/www/html
|
||||
|
@ -8,6 +8,7 @@
|
||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js" integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T" crossorigin="anonymous"></script> <script src="main.js"></script>
|
||||
<script async src = "https://www.googletagmanager.com/gtag/js?id=UA-119564631-1"></script>
|
||||
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
|
||||
<script src="main.js"></script>
|
||||
<script src="analytics.js"></script>
|
||||
</head>
|
||||
|
56
src/main.js
56
src/main.js
@ -9,33 +9,65 @@ function mediaDetect(){
|
||||
var ScreenWidth = window.screen.width;
|
||||
var ScreenHeight = window.screen.height;
|
||||
|
||||
console.log("width: " + ScreenWidth);
|
||||
console.log("height: " + ScreenHeight);
|
||||
print("width: " + ScreenWidth);
|
||||
print("height: " + ScreenHeight);
|
||||
if (ScreenWidth < 768){
|
||||
console.log("user has a phone!");
|
||||
print("user has a phone!");
|
||||
} else if (ScreenWidth < 992) {
|
||||
console.log("user has a tablet!");
|
||||
print("user has a tablet!");
|
||||
} else if (ScreenWidth < 1200) {
|
||||
console.log("user has a desktop!");
|
||||
print("user has a desktop!");
|
||||
} else if (ScreenWidth < 2048) {
|
||||
console.log("user has a hd display!");
|
||||
print("user has a hd display!");
|
||||
} else if (ScreenWidth < 4096) {
|
||||
console.log("user has a display greater than fhd!");
|
||||
print("user has a display greater than fhd!");
|
||||
} else {
|
||||
console.log("what do you spend your money on?")
|
||||
print("what do you spend your money on?");
|
||||
}
|
||||
}
|
||||
|
||||
function whatTimeIsIt(){
|
||||
var death = new Date();
|
||||
var timezone = death.getTimezoneOffset();
|
||||
var getHoursOffset;
|
||||
var getMinutesOffset;
|
||||
var getSecondsOffset;
|
||||
|
||||
if (navigator.geolocation) {
|
||||
navigator.geolocation.getCurrentPosition();
|
||||
} else {
|
||||
print("Geolocation is not supported. Update your shit.");
|
||||
}
|
||||
|
||||
function timezoneOffset(zone){
|
||||
var offset = Math.abs(zone/60);
|
||||
|
||||
getHoursOffset = death.getHours + offset;
|
||||
getMinutesOffset = death.getMinutes + offset;
|
||||
getSecondsOffset = death.getSeconds + offset;
|
||||
|
||||
return getHoursOffset, getMinutesOffset, getSecondsOffset;
|
||||
}
|
||||
|
||||
function isPastNoon(){
|
||||
if (death.getHours > 12) {
|
||||
death.getHours()-12;
|
||||
if (death.getHours() > 12) {
|
||||
print(death.getHours() - 12);
|
||||
} else {
|
||||
death.getHours();
|
||||
print(death.getHours());
|
||||
}
|
||||
}
|
||||
|
||||
console.log(isPastNoon(), ":", death.getMinutes(), ":", death.getSeconds());
|
||||
//timezoneOffset(timezone);
|
||||
console.log(timezone);
|
||||
print(isPastNoon(), ":", death.getMinutes(), ":", death.getSeconds());
|
||||
print(isPastNoon(), getHoursOffset(), getMinutesOffset(), getSecondsOffset());
|
||||
|
||||
}
|
||||
|
||||
function backToTop(){
|
||||
// code goes here
|
||||
// this function has a button where js moves the page/screen back to the top
|
||||
}
|
||||
|
||||
mediaDetect();
|
||||
whatTimeIsIt();
|
||||
|
@ -14,8 +14,13 @@ new Twitch.Embed("twitch-embed", {
|
||||
});
|
||||
|
||||
var follow = document.getElementById("twitch-follow");
|
||||
<<<<<<< HEAD
|
||||
follow.addEventListener("click", function() {
|
||||
//code goes here
|
||||
=======
|
||||
follow.addEventListener("click", function(user){
|
||||
this.user = user;
|
||||
>>>>>>> 05b1d079479a667e15c6dcf18f1eb132b19c3849
|
||||
}, false);
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user