diff --git a/bundle.js b/bundle.js index e75f3f4..5232757 100644 --- a/bundle.js +++ b/bundle.js @@ -11025,10 +11025,13 @@ const Proto = require('./gtfs_realtime_pb.js'); const L = require('leaflet'); const routes = require('./routes.js'); -if (window.location.protocol === 'https:') { - let httpsUrl = 'http://' + window.location.hostname + window.location.pathname; - alert('Warning: For up-to-date bus tracking, we\'re switching to HTTP due to open data source limitations. You\'ll be redirected shortly.\n\nClick OK to proceed to the HTTP version') - window.location.href = httpsUrl; +window.onload = function() { + let warningElement = document.getElementById('warning'); + if (window.location.protocol === 'https:') { + warningElement.style.display = 'flex'; + } else { + warningElement.style.display = 'none'; + } } let map = L.map('map').setView([35.1264, 33.4299], 8); diff --git a/index.html b/index.html index 36b6312..348c8e3 100644 --- a/index.html +++ b/index.html @@ -13,9 +13,11 @@ margin: 0; padding: 0; } + #map { min-height: 100%; } + #bus-count { position: absolute; bottom: 10px; @@ -26,17 +28,45 @@ box-shadow: 0 0 5px rgba(0, 0, 0, 0.2); z-index: 1000; } + .roboto-regular { font-family: "Roboto", sans-serif; font-weight: 400; font-style: normal; } + + #warning { + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + padding: 50px 30px; + background-color: rgba(255, 255, 255, 0.85); + text-align: center; + z-index: 2000; + width: 70%; + border-radius: 5px; + box-shadow: 0 0 5px rgba(0, 0, 0, 0.2); + display: none; + justify-content: center; + align-items: center; + font-size: 30px; + } Cyprus bus
-
Buses transmit location:        
+
Buses transmit location:         +
+
+
+ The data for this service is sourced from the National + Opendata Portal.

+ Since the data source uses HTTP, you need to access the Cyprus Bus website via an HTTP connection.

+ To use this service, visit http://cyprusbus.info. +
+