diff --git a/Makefile b/Makefile index c88d095c1..5d0077846 100644 --- a/Makefile +++ b/Makefile @@ -64,7 +64,7 @@ iD.js: Makefile %.min.js: %.js Makefile @rm -f $@ - $(JS_COMPILER) $< -o $@ + $(JS_COMPILER) $< -c -m -o $@ clean: rm -f iD*.js diff --git a/js/id/oauth.js b/js/id/oauth.js index 9ed8eaa31..632dc60cd 100644 --- a/js/id/oauth.js +++ b/js/id/oauth.js @@ -4,8 +4,6 @@ iD.OAuth = function(context) { keys, oauth = {}; - function keyclean(x) { return x.replace(/\W/g, ''); } - function timenonce(o) { o.oauth_timestamp = ohauth.timestamp(); o.oauth_nonce = ohauth.nonce(); diff --git a/js/id/svg/labels.js b/js/id/svg/labels.js index 507f4cbdd..0636c49d6 100644 --- a/js/id/svg/labels.js +++ b/js/id/svg/labels.js @@ -80,9 +80,9 @@ iD.svg.Labels = function(projection) { .data(entities, iD.Entity.key) .attr({ 'startOffset': '50%', - 'xlink:href': function(d, i) { return '#halo-' + d.id; } + 'xlink:href': function(d) { return '#halo-' + d.id; } }) - .text(function(d, i) { return name(d); }); + .text(function(d) { return name(d); }); texts.exit().remove(); @@ -97,7 +97,7 @@ iD.svg.Labels = function(projection) { halos.enter() .append('path') .style('stroke-width', get(labels, 'font-size')) - .attr('id', function(d, i) { return 'halo-' + d.id; }) + .attr('id', function(d) { return 'halo-' + d.id; }) .attr('class', classes); halos.attr('d', get(labels, 'lineString')); diff --git a/js/id/svg/lines.js b/js/id/svg/lines.js index 59fec46e1..a94ad3a25 100644 --- a/js/id/svg/lines.js +++ b/js/id/svg/lines.js @@ -127,7 +127,7 @@ iD.svg.Lines = function(projection) { text.selectAll('.textpath') .filter(filter) - .attr('xlink:href', function(d, i) { return '#shadow-' + d.id; }) + .attr('xlink:href', function(d) { return '#shadow-' + d.id; }) .text(function(d) { // adding longer text than necessary, since overflow is hidden return (new Array(Math.floor(lengths[d.id] * 1.1))).join(arrowtext); diff --git a/js/id/svg/member_classes.js b/js/id/svg/member_classes.js index 713cc898e..1b4adf673 100644 --- a/js/id/svg/member_classes.js +++ b/js/id/svg/member_classes.js @@ -2,7 +2,7 @@ iD.svg.MemberClasses = function(graph) { var tagClassRe = /^member-?/; return function memberClassesSelection(selection) { - selection.each(function memberClassesEach(d, i) { + selection.each(function memberClassesEach(d) { var classes, value = this.className; if (value.baseVal !== undefined) value = value.baseVal; diff --git a/js/id/ui/key_reference.js b/js/id/ui/key_reference.js index 1c1515150..c5e2b206f 100644 --- a/js/id/ui/key_reference.js +++ b/js/id/ui/key_reference.js @@ -27,7 +27,7 @@ iD.ui.keyReference = function(selection) { .append('tr'); var cols = rows.selectAll('td') - .data(function(d, i) { + .data(function(d) { return [d.value, d.description || "", d.count]; }) .enter() diff --git a/js/id/ui/lasso.js b/js/id/ui/lasso.js index 3cfe02ac1..cbf6fe412 100644 --- a/js/id/ui/lasso.js +++ b/js/id/ui/lasso.js @@ -1,7 +1,6 @@ iD.ui.Lasso = function() { - var center, box, - group, + var box, group, a = [0, 0], b = [0, 0]; diff --git a/js/id/ui/success.js b/js/id/ui/success.js index 17a577fb3..4d4799ffd 100644 --- a/js/id/ui/success.js +++ b/js/id/ui/success.js @@ -19,7 +19,7 @@ iD.ui.Success = function(connection) { connection.changesetUrl(changeset.id); header.append('a') - .attr('href', function(d) { + .attr('href', function() { return connection.changesetUrl(changeset.id); }) .attr('target', '_blank') @@ -28,7 +28,7 @@ iD.ui.Success = function(connection) { header.append('a') .attr('target', '_blank') - .attr('href', function(d) { + .attr('href', function() { return 'https://twitter.com/intent/tweet?source=webclient&text=' + encodeURIComponent(message); }) diff --git a/js/id/ui/tageditor.js b/js/id/ui/tageditor.js index cfd64bd4a..6e88cf6b5 100644 --- a/js/id/ui/tageditor.js +++ b/js/id/ui/tageditor.js @@ -89,12 +89,12 @@ iD.ui.TagEditor = function(context) { presetUI = iD.ui.preset(context) .entity(entity) - .on('change', function(tags) { + .on('change', function() { event.changeTags(); }); tagList = iD.ui.Taglist(context) - .on('change', function(tags) { + .on('change', function() { event.changeTags(); }); @@ -120,7 +120,7 @@ iD.ui.TagEditor = function(context) { event.changeTags(); } - function apply(entity) { + function apply() { event.changeTags(); event.close(); }