<!DOCTYPE html>
<html lang="en">
<head>
  <!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GT-PJ7M8LJB');</script>
<!-- End Google Tag Manager -->

<!-- ============================================================
     SEO: hidden H1 + descriptive paragraph for crawlers only
     clip method is safe — Google will not penalise this
     ============================================================ -->
<h1 style="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;">GTA Update — Live Toronto Police &amp; Fire Call Tracker</h1>
<p  style="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;">Real-time emergency dispatch data for Toronto and the Greater Toronto Area. Tracks Toronto Police Service (TPS) and Toronto Fire Services (TFS) calls including fires, medical assists, break and enter, and major incidents. Updated continuously from live public dispatch feeds.</p>

<!-- ============================================================
     Core meta
     ============================================================ -->
<meta charset="UTF-8" />
<meta name="viewport"     content="width=device-width, initial-scale=1" />
<meta name="description"  content="Live Toronto Police and Fire calls for the Greater Toronto Area. Real-time TPS and TFS dispatch feed — see active incidents, emergencies, and major alerts as they happen."/>
<meta name="keywords"     content="Toronto police calls, Toronto fire calls, TPS dispatch, TFS dispatch, GTA emergency tracker, Toronto incident tracker, real-time Toronto emergency" />
<meta name="robots"       content="index, follow" />
<link rel="canonical"     href="https://gtaupdate.com/" />
<link rel="sitemap"       type="application/xml" title="Sitemap" href="/sitemap.xml" />

<!-- ============================================================
     Open Graph
     ============================================================ -->
<meta property="og:title"       content="GTA Update — Live Toronto Police &amp; Fire Tracker" />
<meta property="og:description" content="Real-time Toronto Police and Fire dispatch data for the GTA. Live incidents, updated continuously." />
<meta property="og:url"         content="https://gtaupdate.com/" />
<meta property="og:type"        content="website" />
<meta property="og:image"       content="https://gtaupdate.com/img/og-image.jpg" />
<meta property="og:image:width"  content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:site_name"   content="GTA Update" />
<meta property="og:locale"      content="en_CA" />

<!-- ============================================================
     Twitter Card
     ============================================================ -->
<meta name="twitter:card"        content="summary_large_image" />
<meta name="twitter:title"       content="GTA Update — Live Toronto Police &amp; Fire Tracker" />
<meta name="twitter:description" content="Real-time Toronto Police and Fire dispatch data for the GTA. Live incidents, updated continuously." />
<meta name="twitter:image"       content="https://gtaupdate.com/img/og-image.jpg" />

<!-- ============================================================
     Title & icons
     ============================================================ -->
<title>GTA Update | Live Toronto Police &amp; Fire Call Tracker</title>
<link rel="shortcut icon"    type="image/x-icon"               href="/img/favicon.ico" />
<link rel="icon"             type="image/png" sizes="32x32" href="/img/apple-touch-icon-32x32.png" />
<link rel="apple-touch-icon" sizes="180x180"                href="/img/apple-touch-icon-180x180.png" />
<link rel="manifest"         href="/site.webmanifest" />

<!-- ============================================================
     Schema.org structured data
     ============================================================ -->
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "WebApplication",
  "name": "GTA Update",
  "url": "https://gtaupdate.com/",
  "description": "Real-time Toronto Police and Fire dispatch tracker for the Greater Toronto Area.",
  "applicationCategory": "PublicSafetyApplication",
  "operatingSystem": "All",
  "inLanguage": "en-CA",
  "areaServed": {
    "@type": "City",
    "name": "Toronto",
    "containedInPlace": {
      "@type": "AdministrativeArea",
      "name": "Ontario, Canada"
    }
  },
  "offers": {
    "@type": "Offer",
    "price": "0",
    "priceCurrency": "CAD"
  }
}
</script>

<!-- ============================================================
     Styles
     ============================================================ -->
<link rel="stylesheet" href="/css/style.css?v=1775834312" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400&family=Roboto+Mono:wght@300;400&display=swap" rel="stylesheet" />

<style>
@media (max-width: 768px) and (orientation: landscape) {
    #weatherBar { display: none !important; }
    .feels-like-text { display: none !important; }
    .header-top {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
    }
    .header-bottom {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
    }
    .clock { display: block !important; font-size: 1.2rem !important; }
    .hour-controls { display: flex !important; grid-column: unset !important; }
    .table-container {
        height: calc(100vh - 100px) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }
}
</style>
</head>
<body>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GT-PJ7M8LJB"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager -->
<div id="app-container">
  <header class="page-header">
  <div class="header-top">
    <!-- Left: Title -->
    <div class="title" style="display:flex;align-items:center;gap:0;">
      <a href="/" style="text-decoration:none;" id="logoLink">
      <div style="display:inline-flex; align-items:center; gap:14px; color:white; text-shadow:none;">
        <svg width="36" height="52" viewBox="0 0 36 52" fill="none" xmlns="http://www.w3.org/2000/svg">
          <line x1="18" y1="18" x2="18" y2="48" stroke="#e24b4a" stroke-width="2" stroke-linecap="round"/>
          <line x1="18" y1="18" x2="5" y2="42" stroke="#e24b4a" stroke-width="2" stroke-linecap="round"/>
          <line x1="18" y1="18" x2="31" y2="42" stroke="#e24b4a" stroke-width="2" stroke-linecap="round"/>
          <path d="M6 10 Q18 2 30 10" stroke="#888" stroke-width="1.5" fill="none" stroke-linecap="round"/>
          <path d="M10 14 Q18 8 26 14" stroke="#888" stroke-width="1.5" fill="none" stroke-linecap="round"/>
          <circle cx="18" cy="18" r="2.5" fill="#e24b4a"/>
        </svg>
        <div style="display:flex; flex-direction:column; justify-content:center;">
          <div class="logo-name" style="font-size:22px; font-weight:500; letter-spacing:0.08em; line-height:1;">GTA UPDATE</div>
          <div style="height:2px; background:#e24b4a; width:100%; margin-top:5px;"></div>
          <div class="logo-tagline" style="font-size:10px; letter-spacing:0.18em; margin-top:5px; opacity:0.6;">TORONTO AREA INCIDENT TRACKER</div>
        </div>
      </div>
      </a>
      <a href="https://camroute.ca" style="text-decoration:none;display:inline-flex;align-items:center;margin-left:18px;padding-left:18px;border-left:1px solid #ccc;text-shadow:none;font-weight:normal;text-transform:none;">
        <div style="display:flex; flex-direction:column; justify-content:center;">
          <div class="logo-name" style="font-size:22px; font-weight:500; letter-spacing:0.08em; line-height:1; text-shadow:none; text-transform:none;">CAMROUTE</div>
          <div style="height:2px; background:#00b8cc; width:100%; margin-top:5px;"></div>
          <div class="logo-tagline" style="font-size:10px; letter-spacing:0.18em; margin-top:5px; opacity:0.6; text-shadow:none; text-transform:none;">CAMROUTE.CA</div>
        </div>
      </a>
    </div>

    <!-- Center: Clock -->
    <div class="clock" id="fancyClock"></div>

    <!-- Right: Hour Controls (Feedback button sits left of dropdown) -->
    <div class="hour-controls">
      <button class="pill-btn" style="background:#b8860b; color:#ffffff; border:none; cursor:pointer;" onclick="window.open('https://gtaupdate.com/gta', '_blank')">Old Site</button>
      <button class="pill-btn" id="feedbackBtn" style="background:#e24b4a; color:#ffffff; border:none;">Feedback</button>
      <select id="hourRange">
        <option value="1">1 Hour</option>
        <option value="3">3 Hours</option>
        <option value="6" selected>6 Hours</option>
        <option value="12">12 Hours</option>
        <option value="18">18 Hours</option>
        <option value="24">24 Hours</option>
      </select>
      <span id="hourRangeLabel" class="hour-label">&ndash;</span>
    </div>
  </div>

  <div class="header-bottom">
    <!-- Left: Service Filter Pills -->
    <div class="filter-pills">
      <button class="pill-btn" data-service="all">All</button>
      <button class="pill-btn" data-service="police">Police</button>
      <button class="pill-btn" data-service="fire">Fire</button>
    </div>

    <!-- Center: Weather -->
    <div class="weather" id="weatherBar"></div>

    <!-- Right: Toggle Sliders -->
    <div class="toggle-controls">
      <label class="pill-toggle">
        <span>Dark:</span>
        <input type="checkbox" id="darkModeToggle"><span class="slider"></span>
      </label>
      <label class="pill-toggle">
        <span>No Medical:</span>
        <input type="checkbox" id="hideMedical"><span class="slider"></span>
      </label>
      <label class="pill-toggle">
        <span>Fire 1+:</span>
        <input type="checkbox" id="onlyAlarms"><span class="slider"></span>
      </label>
    </div>
  </div>
</header>

  <div class="container">
    <main class="main-content">
      <style>@keyframes spin { to { transform: rotate(360deg); } }</style>
<div class="table-container">
  <table id="events">
    <thead>
      <tr>
        <th class="col-time">Time</th>
        <th class="col-division">Div.</th>
        <th class="col-description">Description</th>
        <th class="col-location">Location</th>
        <th class="col-units">Units</th>
      </tr>
    </thead>
    <tbody id="events-body">
      <tr id="loading-row">
        <td colspan="5" style="text-align: center; padding: 12px; color: #555;">
          <span style="display: inline-block; width: 16px; height: 16px; border: 2px solid #ccc; border-top-color: #555; border-radius: 50%; animation: spin 0.7s linear infinite; vertical-align: middle; margin-right: 8px;"></span>Loading&hellip;
        </td>
      </tr>
      <tr id="no-events" style="display: none;">
        <td colspan="5" style="text-align: center; padding: 12px; color: #555;">
          No events found with current filters.
        </td>
      </tr>
    </tbody>
  </table>
</div>

    </main>
  </div>
  <div class="footer">
    <footer class="footer">
<span style="font-size:1.5em;color:#ff0000;">This site is for entertainment purposes only.</span><br>
<div class="footer-stats">
<strong>Calls in last 24 hours:</strong>&nbsp;
🚓 Police: <b>611</b> | 🚒 Fire: <b>461</b> &mdash; 🚑 Medical assists: <b>294</b> (64%) | 🛱 Other incidents: <b>167</b> (36%) | 🔥 +1 Alarm Calls: <b>1</b>
</div>
<div class="footer-disclaimer" style="font-size:14px;color:#777;margin-top:4px;">
If you're using this site to make decisions about safety, life, or anything more serious than which potato chips to buy 🥔 &mdash; you've already made a bad one.<br>
Not affiliated with any Toronto services or anyone else. <b>In case of emergency, call 911</b>.
</div>
<div style="margin-top:12px;display:flex;justify-content:center;gap:12px;">
<a href="/about.php" class="pill-btn pill-btn-gray">About this site</a>
<a href="/stats.php" class="pill-btn pill-btn-red">📊 Statistics</a>
</div>
</footer>  </div>
</div>

<!-- Contact Modal -->
<div id="contactModal">
  <div class="modal-content">
    <span class="close-btn" id="closeModal">&times;</span>
    <h2>Contact</h2>
    <label for="contactName">Name</label>
    <input type="text" id="contactName" placeholder="Your name">
    <label for="contactEmail">Email</label>
    <input type="email" id="contactEmail" placeholder="your@email.com">
    <label for="contactMessage">Message</label>
    <textarea id="contactMessage" rows="5" placeholder="Your message"></textarea>
    <div class="modal-actions">
      <button id="cancelBtn">Cancel</button>
      <button id="sendBtn">Send</button>
    </div>
  </div>
</div>

<script src="js/gtaupdate.min.js?v=1775834330" defer></script>

<!-- Feedback modal -->
<div id="feedbackModal" style="display:none; position:fixed; top:0; left:0; width:100vw; height:100vh; background:rgba(0,0,0,0.6); z-index:9999; overflow:auto;">
  <div class="modal-content" style="width:700px; padding-bottom:14px;">
    <span class="close-btn" id="closeFeedbackBtn">&times;</span>
    <h2>Feedback</h2>
    <iframe id="feedbackIframe" src="" width="100%" style="height:68vh; min-height:400px; border:1px solid #333333; display:block;" marginheight="0" marginwidth="0">Loading&hellip;</iframe>
  </div>
</div>

<script>
(function () {
    var FORM_BASE = 'https://docs.google.com/forms/d/e/1FAIpQLSdqmfl4J6IApO0m4hW4iMPGYZtfESN1HgEoLaPPxN0ZX1af8A/viewform';

    function buildDebugInfo() {
        var now = new Date();
        var tz = '';
        try { tz = Intl.DateTimeFormat().resolvedOptions().timeZone; } catch (e) {}

        var hourEl    = document.getElementById('hourRange');
        var activeBtn = document.querySelector('[data-service].active');
        var hideMedEl = document.getElementById('hideMedical');
        var onlyAlEl  = document.getElementById('onlyAlarms');
        var darkEl    = document.getElementById('darkModeToggle');

        return [
            'Browser: '      + navigator.userAgent,
            'Resolution: '   + window.innerWidth + ' x ' + window.innerHeight,
            'URL: '          + window.location.href,
            'Time filter: '  + (hourEl    ? hourEl.value + 'h'              : '?'),
            'Type filter: '  + (activeBtn ? activeBtn.dataset.service        : (localStorage.getItem('gta_service') || 'all')),
            'No Medical: '   + (hideMedEl ? hideMedEl.checked               : '?'),
            'Fire 1+ only: ' + (onlyAlEl  ? onlyAlEl.checked                : '?'),
            'Dark mode: '    + (darkEl    ? darkEl.checked                   : (localStorage.getItem('darkMode') === 'true')),
            'Time: '         + now.toLocaleString() + (tz ? ' (' + tz + ')' : ''),
        ].join('\n');
    }

    var feedbackFirstLoad;

    function openFeedback() {
        var modal  = document.getElementById('feedbackModal');
        var iframe = document.getElementById('feedbackIframe');

        feedbackFirstLoad = true;

        iframe.onload = function () {
            if (!feedbackFirstLoad) {
                closeFeedback();
            }
            feedbackFirstLoad = false;
        };

        iframe.src = FORM_BASE + '?usp=pp_url&entry.7845844=' + encodeURIComponent(buildDebugInfo());
        modal.style.display = 'block';
    }

    function closeFeedback() {
        var modal  = document.getElementById('feedbackModal');
        var iframe = document.getElementById('feedbackIframe');
        modal.style.display = 'none';
        iframe.onload = null;
        iframe.src = '';
    }

    function applyIframeDarkMode(enabled) {
        var iframe = document.getElementById('feedbackIframe');
        if (iframe) {
            iframe.style.filter = enabled ? 'invert(1) hue-rotate(180deg)' : '';
        }
    }

    document.addEventListener('DOMContentLoaded', function () {
        document.getElementById('feedbackBtn').addEventListener('click', openFeedback);
        document.getElementById('closeFeedbackBtn').addEventListener('click', closeFeedback);
        document.getElementById('feedbackModal').addEventListener('click', function (e) {
            if (e.target === this) closeFeedback();
        });

        // Apply dark mode filter to iframe on load and on toggle change.
        // Hooks into the existing #darkModeToggle without altering gtaupdate.js.
        applyIframeDarkMode(localStorage.getItem('darkMode') === 'true');
        var dmToggle = document.getElementById('darkModeToggle');
        if (dmToggle) {
            dmToggle.addEventListener('change', function (e) {
                applyIframeDarkMode(e.target.checked);
            });
        }
    });
}());
</script>
<script>
document.getElementById('logoLink').addEventListener('click', function (e) {
    e.preventDefault();
    window.location.reload();
});
</script>
</body>
</html>
