diff --git a/.eslintrc.json b/.eslintrc.json
index 5b50b53..5e8d80c 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -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"
]
}
}
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 22d0d82..b577859 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,6 @@
vendor
+.vscode
+composer.json
+composer.lock
+.eslintrc.json
+
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..b1549cb
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,3 @@
+{
+ "lua.targetVersion": "5.3"
+}
\ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
index c6e3a77..3d37dbf 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -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
diff --git a/src/index.php b/src/index.php
index d586c90..537e60f 100644
--- a/src/index.php
+++ b/src/index.php
@@ -8,6 +8,7 @@
+
diff --git a/src/main.js b/src/main.js
index 6353c55..372cc9d 100644
--- a/src/main.js
+++ b/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());
-}
\ No newline at end of file
+ //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();
diff --git a/src/twitch-player.js b/src/twitch-player.js
index 0290887..8bb9966 100644
--- a/src/twitch-player.js
+++ b/src/twitch-player.js
@@ -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);
/*