From 6daa5e4fc708d0ee94d1422b3b1dfda1e174fdc4 Mon Sep 17 00:00:00 2001 From: Julien Veyssier Date: Thu, 15 Jun 2017 14:15:59 +0200 Subject: [PATCH] dynamic URL and page title change after loading file or folder --- CHANGELOG.md | 1 + js/gpxedit.js | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e8fcb3..330c093 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - add option to approximate elevation of new point [#18](https://gitlab.com/eneiluj/gpxedit-oc/issues/18) @TheTiPi - support for ownCloud admin settings +- dynamic URL and page title change after loading file or folder ### Changed - change way to cut lines, hover the middle marker and press Del diff --git a/js/gpxedit.js b/js/gpxedit.js index ce09b20..405aa09 100644 --- a/js/gpxedit.js +++ b/js/gpxedit.js @@ -1051,6 +1051,8 @@ catch (err) { console.log('Impossible to fit to bounds \n'+err); } + document.title = 'GpxEdit - ' + folder; + window.history.pushState({'html': '', 'pageTitle': ''},'', '?dir='+encodeURIComponent(folder)); } hideLoadingAnimation(); }).fail(function (){ @@ -1131,6 +1133,8 @@ catch (err) { console.log('Impossible to fit to bounds \n'+err); } + document.title = 'GpxEdit - ' + file; + window.history.pushState({'html': '', 'pageTitle': ''},'', '?file='+encodeURIComponent(file)); } hideLoadingAnimation(); }).fail(function (){