Skip to content

Commit 8d610d7

Browse files
committed
Added functionality to allow for full screen on iPad
1 parent 9235cac commit 8d610d7

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

dartDown.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,17 @@ const fontWidth = 100 / (MAX_TRAINS_PER_DIRECTION * 1.5);
1515
document.body.style.fontSize = `${fontWidth}vw`;
1616

1717
document.addEventListener('DOMContentLoaded', () => {
18+
// Prevent zooming on iOS devices
19+
document.addEventListener('touchmove', (e) => {
20+
if (e.scale !== 1) {
21+
e.preventDefault();
22+
}
23+
}, { passive: false });
24+
25+
document.addEventListener('gesturestart', (e) => {
26+
e.preventDefault();
27+
});
28+
1829
const infoIcon = document.querySelector('.info-icon');
1930
const popupMenu = document.querySelector('.popup-menu');
2031
const titleToggle = document.getElementById('titleToggle');

index.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@
33
<head>
44
<!-- Basic Meta Tags -->
55
<meta charset="UTF-8">
6-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
7+
<meta name="apple-mobile-web-app-capable" content="yes">
8+
<meta name="apple-mobile-web-app-status-bar-style" content="black">
9+
<meta name="apple-mobile-web-app-title" content="dartDown">
710
<meta name="description" content="dartDown: An aesthetically pleasing DART departure board for home display. Shows real-time northbound and southbound train times with color-coded destinations. Customizable station selection, display limits, and time cutoffs.">
11+
<link rel="apple-touch-icon" href="screenshots/dartDown.jpg">
12+
<link rel="apple-touch-startup-image" href="screenshots/dartDown.jpg">
813
<meta name="keywords" content="DART, Irish Rail, departure board, home display, Grand Canal Dock, Malahide, Howth, Greystones, Bray, real-time trains, Dublin transport, aesthetic transit display">
914
<meta name="author" content="dartDown">
1015

0 commit comments

Comments
 (0)