From dfd8a0e92171fbef6fdf66eb724db046b3448967 Mon Sep 17 00:00:00 2001 From: oskar_cieslik Date: Mon, 23 Feb 2015 11:48:50 +0100 Subject: [PATCH] JSLint error JSLint error: "regular expressions should be preceded by a left parenthesis assignment colon or comma" --- js/skip-link-focus-fix.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/skip-link-focus-fix.js b/js/skip-link-focus-fix.js index aa431284..5d2ddec6 100644 --- a/js/skip-link-focus-fix.js +++ b/js/skip-link-focus-fix.js @@ -8,14 +8,14 @@ var id = location.hash.substring( 1 ), element; - if ( ! /^[A-z0-9_-]+$/.test( id ) ) { + if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) { return; } element = document.getElementById( id ); if ( element ) { - if ( ! /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) { + if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) { element.tabIndex = -1; }