Skip to content

Commit

Permalink
Restore not adding custom profile to URL (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
nrenner committed Oct 8, 2018
1 parent 5751792 commit fa86f0d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions js/router/BRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ L.BRouter = L.Class.extend({
delete params.profile;
if (params.alternativeidx == 0)
delete params.alternativeidx;

// don't add custom profile, as these are only stored temporarily
if (params.profile && params.profile.substring(0, 7) === 'custom_') {
delete params.profile;
}
}

return params;
Expand Down

2 comments on commit fa86f0d

@utack
Copy link

@utack utack commented on fa86f0d Jan 30, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really unfortunate
I used this as a way to advertise what brouter could do
Every time someone asked about something specific, I would send them a profile that tried to do it, and deletion was not a problem because they would click the link soon enough
Could you think about restoring the old behaviour maybe?

Or maybe outsource it into a "permalink" buttom, that spawns a warning it will only work for a limited time?

@nrenner
Copy link
Owner Author

@nrenner nrenner commented on fa86f0d Feb 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about this, I suppose that restriction was removed by accident in #74. This was never a supported or announced feature and has not been live on brouter.de.

That custom profiles are deleted only after some time is an implementation detail that can change at any time and should not be exposed to the user.

The plan is that the user can make profiles permanent and I was going to work on that next, but then #145 has come up.

Please sign in to comment.