Update main.js

This commit is contained in:
Kyle
2018-12-23 11:59:23 -08:00
parent 0e1bafddc5
commit f1e901b67f

View File

@@ -21,9 +21,9 @@ if(navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/webOS/i)
} else { } else {
var isMobile = false var isMobile = false
} }
var isChrome = navigator.userAgent.indexOf('Chrome') > -1 var isChrome = navigator.userAgent.indexOf("Chrome") > -1
var isExplorer = navigator.userAgent.indexOf('MSIE') > -1 var isExplorer = navigator.userAgent.indexOf("MSIE") > -1
var isFirefox = navigator.userAgent.indexOf('Firefox') > -1 var isFirefox = navigator.userAgent.indexOf("Firefox") > -1
var isSafari = navigator.userAgent.indexOf("Safari") > -1 var isSafari = navigator.userAgent.indexOf("Safari") > -1
if (isChrome == true && isSafari == true) { if (isChrome == true && isSafari == true) {
isSafari = false isSafari = false
@@ -1036,13 +1036,13 @@ function getCookie(cookieName) {
} }
function checkCookies() { function checkCookies() {
if (getCookie("visited") != "true") { if (getCookie("visited") != "true") {
setCookie("visited", "true")
if (isMobile == true) { if (isMobile == true) {
alert("Thanks for using Card Conjurer! Unfortunately some users have been experiencing difficulty on mobile devices when uploading pictures they took on that mobile device. An easy solution is to quickly edit that picture by cropping it slightly. Otherwise, images from URLs and other sources should work normally.") alert("Thanks for using Card Conjurer! Unfortunately some users have been experiencing difficulty on mobile devices when uploading pictures they took on that mobile device. An easy solution is to quickly edit that picture by cropping it slightly. Otherwise, images from URLs and other sources should work normally. (cookie result: " + getCookie("visited") + ")")
} }
setCookie("visited", "true")
} else { } else {
console.log("Welcome back to Card Conjurer!") console.log("Welcome back to Card Conjurer!")
} }
} }
checkCookies() checkCookies()