1(function( $ ) { 'use strict'; 2 3 if ( wpa.skiplinks.enabled ) { 4 $('body').prepend( wpa.skiplinks.output ); 5 } 6 7 var html = document.querySelector( 'html' ); 8 var lang = html.getAttribute( 'lang' ); 9 if ( ! lang ) { 10 $('html').attr( 'lang', wpa.lang ); 11 } 12 var dir = html.getAttribute( 'dir' ); 13 if ( ! dir ) { 14 $('html').attr( 'dir', wpa.dir ); 15 } 16 17 var viewport = document.querySelector( 'meta[name="viewport"]' ); 18 if ( viewport ) { 19 var conditions = viewport.getAttribute( 'content' ); 20 if ( conditions.search(/user-scalable=no/g) ) { 21 conditions = conditions.replace( 'user-scalable=no', 'user-scalable=yes' ); 22 viewport.setAttribute( 'content', conditions ); 23 } 24 } 25 26 if ( wpa.target ) { 27 $('a:not(.wpa-allow-target)').removeAttr( 'target' ); 28 } 29 30 if ( wpa.tabindex ) { 31 // Remove tabindex from elements that should be natively focusable. 32 var focusable = $('input,a,select,textarea,button').not('a:not([href])'); 33 focusable.removeAttr('tabindex'); 34 35 // Add tabindex to elements that appear active but are not natively focusable. 36 var fakeButtons = $('div[role="button"]').not('div[tabindex]' ); 37 var buttonLinks = $('a[role="button"]').not('a[tabindex],a[href]'); 38 fakeButtons.attr( 'tabindex', '0' ).addClass('wpa-focusable'); 39 buttonLinks.attr( 'tabindex', '0' ).addClass('wpa-focusable'); 40 } 41 42 if ( wpa.underline.enabled ) { 43 $( wpa.underline.target ).not( 'nav ' + wpa.underline.target ).css( 'text-decoration','underline' ); 44 $( wpa.underline.target ).on( 'focusin mouseenter', function() { 45 $(this).css( 'text-decoration','none' ); 46 }); 47 $( wpa.underline.target ).on( 'focusout mouseleave', function() { 48 $(this).css( 'text-decoration','underline' ); 49 }); 50 } 51 52}(jQuery));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.