Add JS redirect to play2048.co

This commit is contained in:
Gabriele Cirulli
2018-11-04 12:35:10 +01:00
parent 9662478fbe
commit 8f7725b8ab
2 changed files with 11 additions and 1 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ CACHE MANIFEST
# Adds the ability to play the game offline.
# The following comment needs to be updated whenever a change is made.
# Run `rake appcache:update` to do so
# Updated: 2018-11-04T11:11:51+01:00
# Updated: 2018-11-04T12:34:31+01:00
# Main page
index.html
+10
View File
@@ -4,6 +4,16 @@
<meta charset="utf-8">
<title>2048</title>
<script>
if (typeof window !== undefined && typeof window.location !== undefined && window.location.hostname === "gabrielecirulli.github.io") {
if (typeof window.location.replace === "function") {
window.location.replace("https://play2048.co/");
} else {
window.location = "https://play2048.co/"
}
}
</script>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-42620757-2"></script>
<script>
window.dataLayer = window.dataLayer || [];