diff options
author | Jesse Hallett <jesse@galois.com> | 2013-12-19 14:43:47 -0800 |
---|---|---|
committer | Jesse Hallett <jesse@galois.com> | 2013-12-19 14:51:32 -0800 |
commit | 2f26ce9d6d06e92fdd10249e6b61d7c73122d572 (patch) | |
tree | e72666bfdebaebf24998d8e549165b571b63c024 | |
parent | e71713d3f54c7856ab9fc3d81d276c6da06a83eb (diff) |
Fixes missing variable definition
-rw-r--r-- | .jshintrc | 1 | ||||
-rw-r--r-- | guidelines/wikipedia/color.js | 5 |
2 files changed, 2 insertions, 4 deletions
@@ -3,7 +3,6 @@ "laxcomma": true, "undef": true, "jquery": true, - "devel": true, "globals": { "fiveui": false, "$5": false, diff --git a/guidelines/wikipedia/color.js b/guidelines/wikipedia/color.js index 045a8ac..b9eb31b 100644 --- a/guidelines/wikipedia/color.js +++ b/guidelines/wikipedia/color.js @@ -50,15 +50,14 @@ exports.rule = function (report) { // filter for lowest level elts having non-empty text .filter(function () { var $this = $(this); - return $this.children().length == 0 && $.trim($this.text()).length > 0; + return $this.children().length === 0 && $.trim($this.text()).length > 0; }) .filter(exceptions) - .each(function (i) { + .each(function (i, elt) { var fg = fc.colorToRGB($(this).css('color')); var bg = fc.findBGColor($(this)); if (fg && bg) { var ratio = fc.contrast(fc.luminance(fg), fc.luminance(bg)); - console.log("comparing witch ratio" + ratio); if (ratio < getAARatio(elt)) { report.error('Element has poor contrast: ' + ratio + " ratio should be greater than " + getAARatio(elt), elt); |