diff --git a/background.js b/background.js index 64d2af0..82036a2 100644 --- a/background.js +++ b/background.js @@ -74,9 +74,9 @@ function toWGS84(point) { */ function trackTitle(geoJson) { const route = geoJson.segments[0]; - const book = geoJson.book_route_number ? `${geoJson.book_route_number}-` : ""; + const book = geoJson.book_route_number ? `${geoJson.book_route_number} - ` : ""; - return `${book}${route.route_id} ${route.title}`; + return `${book}${geoJson.title}`; } /** @@ -182,7 +182,7 @@ function handleClick(tab) { let downloading = browser.downloads.download({ url : objectURL, - filename : `track-${gpxTrack.title}.gpx`, + filename : `${gpxTrack.title}.gpx`, saveAs: true, conflictAction : 'uniquify' }); @@ -222,7 +222,7 @@ function updateIcon(tab) { tabId: tab.id }); browser.browserAction.setTitle({ - title: hasTrack ? `Download track ${gpxTrack.title}` : 'No track selected', + title: hasTrack ? `Download track "${gpxTrack.title}"` : 'No track selected', tabId: tab.id }); } diff --git a/manifest.json b/manifest.json index e89dbd4..60ddb60 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "SAC Route Portal GPX Downloader", - "version": "0.5", + "version": "0.6", "developer": { "name": "Sebastian Hugentobler", "url": "https://code.vanwa.ch/sebastian/sac-route-portal-gpx-fx"