Updated based on feedback.
* Include skip-link-focus-fix.js in the js hint/lint tests & fix up the file. * Pull in .jshintrc from WP SVN. * Add PHPCompatibility Sniffs. * Sync the ignore statements to always exclude .min.js files. * Slim down the tested against PHP versions even more.
This commit is contained in:
parent
b8d776c59c
commit
e1f4b0add4
6 changed files with 22 additions and 48 deletions
|
@ -1,16 +1,16 @@
|
|||
/**
|
||||
* skip-link-focus-fix.js
|
||||
* File skip-link-focus-fix.js.
|
||||
*
|
||||
* Helps with accessibility for keyboard only users.
|
||||
*
|
||||
* Learn more: https://git.io/vWdr2
|
||||
*/
|
||||
( function() {
|
||||
var is_webkit = navigator.userAgent.toLowerCase().indexOf( 'webkit' ) > -1,
|
||||
is_opera = navigator.userAgent.toLowerCase().indexOf( 'opera' ) > -1,
|
||||
is_ie = navigator.userAgent.toLowerCase().indexOf( 'msie' ) > -1;
|
||||
var isWebkit = navigator.userAgent.toLowerCase().indexOf( 'webkit' ) > -1,
|
||||
isOpera = navigator.userAgent.toLowerCase().indexOf( 'opera' ) > -1,
|
||||
isIe = navigator.userAgent.toLowerCase().indexOf( 'msie' ) > -1;
|
||||
|
||||
if ( ( is_webkit || is_opera || is_ie ) && document.getElementById && window.addEventListener ) {
|
||||
if ( ( isWebkit || isOpera || isIe ) && document.getElementById && window.addEventListener ) {
|
||||
window.addEventListener( 'hashchange', function() {
|
||||
var id = location.hash.substring( 1 ),
|
||||
element;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue