From: Bryan Housel Date: Mon, 16 Apr 2018 18:49:12 +0000 (-0400) Subject: Allow changeset source tag to be settable via url api X-Git-Tag: live~3606 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/4399cc793fdc33b181f35398e4421b03888ed9c6?hp=714d3d9e2dec7f5449053fb3b536fd850d368aa2 Allow changeset source tag to be settable via url api (see https://github.com/openstreetmap/iD/issues/4899) --- diff --git a/app/assets/javascripts/edit/id.js.erb b/app/assets/javascripts/edit/id.js.erb index 983117183..a85fcef45 100644 --- a/app/assets/javascripts/edit/id.js.erb +++ b/app/assets/javascripts/edit/id.js.erb @@ -2,9 +2,9 @@ $(document).ready(function () { var id = $("#id-embed"); if (id.data("key")) { - var hashParams = OSM.params(location.hash.substring(1)), - mapParams = OSM.mapParams(), - params = {}; + var hashParams = OSM.params(location.hash.substring(1)); + var mapParams = OSM.mapParams(); + var params = {}; if (mapParams.object) { params.id = mapParams.object.type[0] + mapParams.object.id; @@ -20,8 +20,9 @@ $(document).ready(function () { if (hashParams.background) params.background = hashParams.background; if (hashParams.comment) params.comment = hashParams.comment; - if (hashParams.disable_features) params.disable_features = hashParams.disable_features; if (hashParams.hashtags) params.hashtags = hashParams.hashtags; + if (hashParams.source) params.source = hashParams.source; + if (hashParams.disable_features) params.disable_features = hashParams.disable_features; if (hashParams.offset) params.offset = hashParams.offset; if (hashParams.walkthrough) params.walkthrough = hashParams.walkthrough;