From 2f26ce9d6d06e92fdd10249e6b61d7c73122d572 Mon Sep 17 00:00:00 2001 From: Jesse Hallett Date: Thu, 19 Dec 2013 14:43:47 -0800 Subject: Fixes missing variable definition --- .jshintrc | 1 - guidelines/wikipedia/color.js | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.jshintrc b/.jshintrc index c1a19a6..df127b0 100644 --- a/.jshintrc +++ b/.jshintrc @@ -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); -- cgit v1.2.3