aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jesse Hallett <jesse@galois.com>2013-12-19 14:43:47 -0800
committerGravatar Jesse Hallett <jesse@galois.com>2013-12-19 14:51:32 -0800
commit2f26ce9d6d06e92fdd10249e6b61d7c73122d572 (patch)
treee72666bfdebaebf24998d8e549165b571b63c024
parente71713d3f54c7856ab9fc3d81d276c6da06a83eb (diff)
Fixes missing variable definition
-rw-r--r--.jshintrc1
-rw-r--r--guidelines/wikipedia/color.js5
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);