From fbed61fa1ea86f19b361995de2a7599cf079627b Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Thu, 19 Mar 2015 14:29:27 -0400 Subject: [PATCH] Add host, locale, user_agent to changeset tags (closes #2449) --- js/id/core/connection.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/js/id/core/connection.js b/js/id/core/connection.js index 65cb5fbf7..75b681ba9 100644 --- a/js/id/core/connection.js +++ b/js/id/core/connection.js @@ -242,12 +242,15 @@ iD.Connection = function() { connection.changesetTags = function(comment, imageryUsed) { var tags = { + created_by: 'iD ' + iD.version, + host: (window.location.origin + window.location.pathname).substr(0, 255), + locale: iD.detect().locale, + user_agent: navigator.userAgent.substr(0, 255), imagery_used: imageryUsed.join(';').substr(0, 255), - created_by: 'iD ' + iD.version }; if (comment) { - tags.comment = comment; + tags.comment = comment.substr(0, 255); } return tags;