From 7047337766d912930d347dc3612422d06dc6f098 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 9 Jan 2022 12:05:59 +0100 Subject: realtime delay: use "+X ⇒ HH:MM" instead of "(+X) HH:MM" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/static/js/geostop.min.js | 2 +- public/static/js/geotrain.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'public/static/js') diff --git a/public/static/js/geostop.min.js b/public/static/js/geostop.min.js index 98e710b..e703451 100644 --- a/public/static/js/geostop.min.js +++ b/public/static/js/geostop.min.js @@ -1 +1 @@ -$(function(){function t(e){r(),e.error?o("Backend-Fehler:",e.error,null):0==e.candidates.length?o("Keine Bahnhöfe in 70km Umkreis gefunden","",null):$.each(e.candidates,function(e,t){var n=t.ds100,r=t.name,o=(o=t.distance).toFixed(1),t=$(document.createElement("a"));t.attr("href",n),t.text(r);r=$(document.createElement("div"));r.attr("class","distance"),r.text(o),t.append(r),$("div.candidatelist").append(t)})}var r=function(){$("div.candidatestatus").remove()},o=function(e,t,n){var r=$(document.createElement("div"));r.attr("class","error"),r.text(t);t=$(document.createElement("strong"));t.text(e),r.prepend(t),n&&((t=$(document.createElement("div"))).attr("class","errcode"),t.text(n),r.append(t)),$("div.candidatelist").append(r)};navigator.geolocation?(navigator.geolocation.getCurrentPosition(function(e){$.post("/_geolocation",{lon:e.coords.longitude,lat:e.coords.latitude},t).fail(function(e,t,n){r(),o("Netzwerkfehler: ",t,n)}),$("div.candidatestatus").text("Suche Bahnhöfe…")},function(e){r(),e.code==e.PERMISSION_DENIED?o("Standortanfrage nicht möglich.","Vermutlich fehlen die Rechte im Browser oder der Android Location Service ist deaktiviert.","geolocation.error.PERMISSION_DENIED"):e.code==e.POSITION_UNAVAILABLE?o("Standort konnte nicht ermittelt werden","(Service nicht verfügbar)","geolocation.error.POSITION_UNAVAILABLE"):e.code==e.TIMEOUT?o("Standort konnte nicht ermittelt werden","(Timeout)","geolocation.error.TIMEOUT"):o("Standort konnte nicht ermittelt werden","(unbekannter Fehler)","unknown geolocation.error code")}),$("div.candidatestatus").text("Position wird bestimmt…")):(r(),o("Standortanfragen werden von diesem Browser nicht unterstützt","",null))}); +$(function(){function t(e){r(),e.error?o("Backend-Fehler:",e.error,null):0==e.candidates.length?o("Keine Bahnhöfe in 70km Umkreis gefunden","",null):$.each(e.candidates,function(e,t){var n=t.ds100,r=t.name,o=(o=t.distance).toFixed(1),t=$(document.createElement("a"));t.attr("href",n),t.text(r);r=$(document.createElement("div"));r.attr("class","distance"),r.text(o),t.append(r),$("div.candidatelist").append(t)})}var r=function(){$("div.candidatestatus").remove()},o=function(e,t,n){var r=$(document.createElement("div"));r.attr("class","error"),r.text(t);var t=$(document.createElement("strong"));t.text(e),r.prepend(t),n&&((t=$(document.createElement("div"))).attr("class","errcode"),t.text(n),r.append(t)),$("div.candidatelist").append(r)};navigator.geolocation?(navigator.geolocation.getCurrentPosition(function(e){$.post("/_geolocation",{lon:e.coords.longitude,lat:e.coords.latitude},t).fail(function(e,t,n){r(),o("Netzwerkfehler: ",t,n)}),$("div.candidatestatus").text("Suche Bahnhöfe…")},function(e){r(),e.code==e.PERMISSION_DENIED?o("Standortanfrage nicht möglich.","Vermutlich fehlen die Rechte im Browser oder der Android Location Service ist deaktiviert.","geolocation.error.PERMISSION_DENIED"):e.code==e.POSITION_UNAVAILABLE?o("Standort konnte nicht ermittelt werden","(Service nicht verfügbar)","geolocation.error.POSITION_UNAVAILABLE"):e.code==e.TIMEOUT?o("Standort konnte nicht ermittelt werden","(Timeout)","geolocation.error.TIMEOUT"):o("Standort konnte nicht ermittelt werden","(unbekannter Fehler)","unknown geolocation.error code")}),$("div.candidatestatus").text("Position wird bestimmt…")):(r(),o("Standortanfragen werden von diesem Browser nicht unterstützt","",null))}); diff --git a/public/static/js/geotrain.min.js b/public/static/js/geotrain.min.js index 910bc1c..bce7881 100644 --- a/public/static/js/geotrain.min.js +++ b/public/static/js/geotrain.min.js @@ -1 +1 @@ -$(function(){function t(e){r(),e.error?o("Backend-Fehler:",e.error,null):0==e.evas.length?o("Keine Bahnstrecke gefunden","",null):0==e.trains.length?o("Keine Züge auf der Strecke gefunden","",null):$.each(e.trains,function(e,t){var n=t.stops[0][1],r=t.stops[0][2],o=t.stops[1][0],i=t.stops[1][1],a=t.stops[1][2],d=$(document.createElement("a"));d.attr("href","/z/"+t.train+"/"+o),d.text(t.line);o=$(document.createElement("div"));o.attr("class","traininfo"),o.html(t.likelihood+"%
"+r+" "+n+"
"+a+" "+i),d.append(o),$("div.candidatelist").append(d)})}var r=function(){$("div.candidatestatus").remove()},o=function(e,t,n){var r=$(document.createElement("div"));r.attr("class","error"),r.text(t);t=$(document.createElement("strong"));t.text(e),r.prepend(t),n&&((t=$(document.createElement("div"))).attr("class","errcode"),t.text(n),r.append(t)),$("div.candidatelist").append(r)};navigator.geolocation?(navigator.geolocation.getCurrentPosition(function(e){$.get("https://dbf.finalrewind.org/__geotrain/search",{lon:e.coords.longitude,lat:e.coords.latitude},t).fail(function(e,t,n){r(),o("Netzwerkfehler: ",t,n)}),$("div.candidatestatus").text("Suche Züge…")},function(e){r(),e.code==e.PERMISSION_DENIED?o("Standortanfrage nicht möglich.","Vermutlich fehlen die Rechte im Browser oder der Android Location Service ist deaktiviert.","geolocation.error.PERMISSION_DENIED"):e.code==e.POSITION_UNAVAILABLE?o("Standort konnte nicht ermittelt werden","(Service nicht verfügbar)","geolocation.error.POSITION_UNAVAILABLE"):e.code==e.TIMEOUT?o("Standort konnte nicht ermittelt werden","(Timeout)","geolocation.error.TIMEOUT"):o("Standort konnte nicht ermittelt werden","(unbekannter Fehler)","unknown geolocation.error code")}),$("div.candidatestatus").text("Position wird bestimmt…")):(r(),o("Standortanfragen werden von diesem Browser nicht unterstützt","",null))}); +$(function(){function t(e){r(),e.error?o("Backend-Fehler:",e.error,null):0==e.evas.length?o("Keine Bahnstrecke gefunden","",null):0==e.trains.length?o("Keine Züge auf der Strecke gefunden","",null):$.each(e.trains,function(e,t){var n=t.stops[0][1],r=t.stops[0][2],o=t.stops[1][0],i=t.stops[1][1],a=t.stops[1][2],d=$(document.createElement("a"));d.attr("href","/z/"+t.train+"/"+o),d.text(t.line);o=$(document.createElement("div"));o.attr("class","traininfo"),o.html(t.likelihood+"%
"+r+" "+n+"
"+a+" "+i),d.append(o),$("div.candidatelist").append(d)})}var r=function(){$("div.candidatestatus").remove()},o=function(e,t,n){var r=$(document.createElement("div"));r.attr("class","error"),r.text(t);var t=$(document.createElement("strong"));t.text(e),r.prepend(t),n&&((t=$(document.createElement("div"))).attr("class","errcode"),t.text(n),r.append(t)),$("div.candidatelist").append(r)};navigator.geolocation?(navigator.geolocation.getCurrentPosition(function(e){$.get("https://dbf.finalrewind.org/__geotrain/search",{lon:e.coords.longitude,lat:e.coords.latitude},t).fail(function(e,t,n){r(),o("Netzwerkfehler: ",t,n)}),$("div.candidatestatus").text("Suche Züge…")},function(e){r(),e.code==e.PERMISSION_DENIED?o("Standortanfrage nicht möglich.","Vermutlich fehlen die Rechte im Browser oder der Android Location Service ist deaktiviert.","geolocation.error.PERMISSION_DENIED"):e.code==e.POSITION_UNAVAILABLE?o("Standort konnte nicht ermittelt werden","(Service nicht verfügbar)","geolocation.error.POSITION_UNAVAILABLE"):e.code==e.TIMEOUT?o("Standort konnte nicht ermittelt werden","(Timeout)","geolocation.error.TIMEOUT"):o("Standort konnte nicht ermittelt werden","(unbekannter Fehler)","unknown geolocation.error code")}),$("div.candidatestatus").text("Position wird bestimmt…")):(r(),o("Standortanfragen werden von diesem Browser nicht unterstützt","",null))}); -- cgit v1.2.3