| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | ( function ( localized ) { |
| 2 | 2 | function ready( fn ) { |
| 3 | - if ( document.readyState != 'loading' ) { | |
| 3 | + if ( document.readyState !== 'loading' ) { | |
| 4 | 4 | fn(); |
| 5 | 5 | } else { |
| 6 | 6 | document.addEventListener( 'DOMContentLoaded', fn ); |
| 7 | 7 | } |
| @@ -10,9 +10,9 @@ | ||
| 10 | 10 | function fetch_scan_treats_and_add_link() { |
| 11 | 11 | var xhrRequest = new XMLHttpRequest(); |
| 12 | 12 | xhrRequest.open( 'GET', localized.scan_endpoint, true ); |
| 13 | 13 | xhrRequest.onload = function () { |
| 14 | - if ( this.status == 200 ) { | |
| 14 | + if ( this.status === 200 ) { | |
| 15 | 15 | // Success! |
| 16 | 16 | var body = JSON.parse( this.response ); |
| 17 | 17 | if ( body && body.data ) { |
| 18 | 18 | var apiResponse = JSON.parse( body.data ); |
| @@ -44,9 +44,9 @@ | ||
| 44 | 44 | element.parentNode.removeChild( element ); |
| 45 | 45 | return; |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | - var textLabel = numberOfThreats == 1 ? localized.singular : localized.multiple; | |
| 48 | + var textLabel = numberOfThreats === 1 ? localized.singular : localized.multiple; | |
| 49 | 49 | element.innerHTML = |
| 50 | 50 | '<a href="' + localized.scan_dashboard_url + '" class="ab-item">' + textLabel + '</a>'; |
| 51 | 51 | } |
| 52 | 52 | } )( window.Jetpack_Scan ); |