diff options
| author | Juuso Lapinlampi <wub@partyvan.eu> | 2015-10-11 18:21:51 +0200 |
|---|---|---|
| committer | Juuso Lapinlampi <wub@partyvan.eu> | 2015-10-11 18:21:51 +0200 |
| commit | 7bb7029eb356dfc769cf71d40a9d5b31cafa6f53 (patch) | |
| tree | 7d0963292f09ed6785caf9fde8873bc43eb69574 /js/cabinet.js | |
| parent | 6d93e72a544440d7c4cb0609cf6a3dc0f801f5f4 (diff) | |
| parent | 575b78b9d679db2243083f9ecc8b1543b2a1af02 (diff) | |
Merge branch 'eslint-id-length' into fix-eslint-warnings-2
Fixes ESLint id-length warnings. An exception is given to var "i",
because Airbnb's style guide says this is OK. A bug is in
eslint-config-airbnb, which the Airbnb style guide authors have not as
of today accepted to merge to fix the bug.
var "$" will be fixed later.
Diffstat (limited to 'js/cabinet.js')
| -rw-r--r-- | js/cabinet.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/js/cabinet.js b/js/cabinet.js index 2e2408b..09f4e71 100644 --- a/js/cabinet.js +++ b/js/cabinet.js @@ -31,7 +31,7 @@ var _this = this; var passthrough = function(outer, inner, prevent, fn) { - _this.on(outer, function(e) { + _this.on(outer, function(evt) { if (inner === 'click') { $input[0].click(); } else { @@ -39,19 +39,19 @@ } if (prevent) { - e.preventDefault(); + evt.preventDefault(); } if (fn) { - fn(e); + fn(evt); } }, false); }; $input[0].filelist = Object.create(FileList); - $input.on('change', function(e) { - this.filelist = e.target.files; + $input.on('change', function(evt) { + this.filelist = evt.target.files; _this.change(); }); @@ -59,8 +59,8 @@ passthrough('dragover', 'dragover', true); passthrough('dragleave', 'dragleave', true); passthrough('click', 'click', false); - passthrough('drop', 'dragleave', true, function(e) { - $input[0].filelist = e.dataTransfer.files; + passthrough('drop', 'dragleave', true, function(evt) { + $input[0].filelist = evt.dataTransfer.files; _this.change(); }); }; |
