-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.php
109 lines (42 loc) · 1.88 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-RXYGWW7KHB"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-RXYGWW7KHB');
</script>
<script>
function getOS() {
var OS = "Unknown";
var _isMobile = navigator.userAgent.toLowerCase().match(/mobile/i);
var isMobile = "PC";
if (navigator.appVersion.indexOf("Win")!=-1) OS="Windows";
else if (navigator.appVersion.indexOf("Mac")!=-1) OS="MacOS";
else if (navigator.appVersion.indexOf("X11")!=-1) OS="UNIX";
else if (navigator.appVersion.indexOf("Linux")!=-1) OS="Linux";
if (_isMobile == "mobile") {
window.location.replace("https://www.plata.ie/en/mobile/");
} else
{
window.location.replace("https://www.plata.ie/en/");
}
//isMobile = "mobile";
//console.log(navigator.userAgent);
let userAgent = navigator.userAgent;
let browserName;
if(userAgent.match(/chrome|chromium|crios/i)){
browserName = "Chrome";
} else if(userAgent.match(/firefox|fxios/i)){
browserName = "Firefox";
} else if(userAgent.match(/safari/i)){
browserName = "Safari";
}else if(userAgent.match(/opr\//i)){
browserName = "Opera";
} else if(userAgent.match(/edg/i)){
browserName = "Edge";
} else { browserName="Unknown Browser";
}
console.log("Operating System: " + OS + " " + isMobile + " " + browserName);
} getOS();
</script>