Improved www.ttss.krakow.pl
Jacek Kowalski
2019-06-22 38340e01ff8bec3c1a89b9bd294c49f78a73e411
Fix delay calcs when times are from two different days (i.e. 23:59-00:00)
3 files modified
9 ■■■■■ changed files
common.js 5 ●●●●● patch | view | raw | blame | history
index.html 2 ●●● patch | view | raw | blame | history
map.html 2 ●●● patch | view | raw | blame | history
common.js
@@ -165,10 +165,9 @@
}
function parseTime(date, time) {
    var result = new Date(date.getFullYear(), date.getMonth(), date.getDay());
    var result = new Date(date.getTime());
    var time_split = time.split(':');
    result.setHours(time_split[0]);
    result.setMinutes(time_split[1]);
    result.setHours(time_split[0], time_split[1], 0);
    
    if(result.getTime() - date.getTime() > 72000000) {
        result.setTime(result.getTime() - 86400000);
index.html
@@ -135,7 +135,7 @@
        </div>
        <script src="https://polyfill.io/v3/polyfill.min.js?features=Promise,XMLHttpRequest"></script>
        <script type="text/javascript" src="lang_pl.js?v9" id="lang_script"></script>
        <script type="text/javascript" src="common.js?v9"></script>
        <script type="text/javascript" src="common.js?v10"></script>
        <script type="text/javascript" src="index.js?v8"></script>
    </body>
</html>
map.html
@@ -24,7 +24,7 @@
<script src="https://polyfill.io/v3/polyfill.min.js?features=Array.prototype.forEach,Array.prototype.includes,Array.prototype.map,Element.prototype.classList,Promise,String.prototype.startsWith,XMLHttpRequest,requestAnimationFrame"></script>
<script src="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v5.3.0/build/ol.js" integrity="sha384-iQkGyyH4ioz3m+maM3s9MX1Oq67mACa4B9Z3ovUv3Sv37LJ96fx3WnZfLoiC3Wfl" crossorigin="anonymous"></script>
<script tyle="text/javascript" src="lang_pl.js?v9" id="lang_script"></script>
<script tyle="text/javascript" src="common.js?v9"></script>
<script tyle="text/javascript" src="common.js?v10"></script>
<script tyle="text/javascript" src="map.js?v22"></script>
</body>
</html>