@@ -25,17 +25,17 @@ function _getFonts(style) {
2525 * @return {Boolean }
2626 */
2727function elementIsDistinct ( node , ancestorNode ) {
28- var nodeStyle = window . getComputedStyle ( node ) ;
28+ const nodeStyle = window . getComputedStyle ( node ) ;
2929
3030 // Check if the link has a background
3131 if ( nodeStyle . getPropertyValue ( 'background-image' ) !== 'none' ) {
3232 return true ;
3333 }
3434
3535 // Check if the link has a border or outline
36- var hasBorder = [ 'border-bottom' , 'border-top' , 'outline' ] . reduce (
36+ const hasBorder = [ 'border-bottom' , 'border-top' , 'outline' ] . reduce (
3737 ( result , edge ) => {
38- var borderClr = new Color ( ) ;
38+ const borderClr = new Color ( ) ;
3939 borderClr . parseString ( nodeStyle . getPropertyValue ( edge + '-color' ) ) ;
4040
4141 // Check if a border/outline was specified
@@ -54,13 +54,13 @@ function elementIsDistinct(node, ancestorNode) {
5454 return true ;
5555 }
5656
57- var parentStyle = window . getComputedStyle ( ancestorNode ) ;
57+ const parentStyle = window . getComputedStyle ( ancestorNode ) ;
5858 // Compare fonts
5959 if ( _getFonts ( nodeStyle ) [ 0 ] !== _getFonts ( parentStyle ) [ 0 ] ) {
6060 return true ;
6161 }
6262
63- var hasStyle = [
63+ let hasStyle = [
6464 'text-decoration-line' ,
6565 'text-decoration-style' ,
6666 'font-weight' ,
@@ -74,7 +74,7 @@ function elementIsDistinct(node, ancestorNode) {
7474 ) ;
7575 } , false ) ;
7676
77- var tDec = nodeStyle . getPropertyValue ( 'text-decoration' ) ;
77+ const tDec = nodeStyle . getPropertyValue ( 'text-decoration' ) ;
7878 if ( tDec . split ( ' ' ) . length < 3 ) {
7979 // old style CSS text decoration
8080 hasStyle =
0 commit comments