blob: 4a9c8ce88e871413619a30731b62bd416d922268 (
plain)
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
|
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>tab1</title>
</head>
<body>
<h1 id="content">Tab 1</h1>
<a href="tab2.html" id="tab2">Tab 2</a>
<a href="tab3.html" id="tab3">Tab 3</a>
<!-- here we display if the page is in mobile or desktop view mode -->
<p id="viewMode"></p>
</body>
<script>
window.mobileCheck = function() {
let check = false;
(function(a){
if (a.includes("Android"))
check = true;
}) (navigator.userAgent)
return check;
};
document.getElementById('viewMode').textContent=mobileCheck()? "mobile-site":"desktop-site";
</script>
</html>
|