From: Daniel Carl Date: Thu, 31 Oct 2013 18:15:13 +0000 (+0100) Subject: Removed 'area' element from hinting xpath. X-Git-Url: https://git.owens.tech/112-editable-focus.html/112-editable-focus.html/git?a=commitdiff_plain;h=766611bb79934d63f23771627aff3e1007c0e1c8;p=vimb.git Removed 'area' element from hinting xpath. The area elements will be seen as invisible and therefor not shown, so we don't need to fetch them via xpath. --- diff --git a/src/hints.js b/src/hints.js index 38a4571..d3de542 100644 --- a/src/hints.js +++ b/src/hints.js @@ -368,11 +368,11 @@ var VbHint = (function(){ switch (config.mode) { case "l": if (!s) { - return "//a[@href] | //*[@onclick or @tabindex or @class='lk' or @role='link' or @role='button'] | //input[not(@type='hidden' or @disabled or @readonly)] | //area[@href] | //textarea[not(@disabled or @readonly)] | //button | //select"; + return "//a[@href] | //*[@onclick or @tabindex or @class='lk' or @role='link' or @role='button'] | //input[not(@type='hidden' or @disabled or @readonly)] | //textarea[not(@disabled or @readonly)] | //button | //select"; } return buildQuery( ["@value", ".", "@placeholder", "@title", "@alt"], - "//a[@href and ($. or child::img[$@title or $@alt])] | //*[(@onclick or @class='lk' or @role='link' or role='button') and $.] | //input[not(@type='hidden' or @disabled or @readonly) and ($@value or $@placeholder)] | //area[$.] | //textarea[not(@disabled or @readonly) and $.] | //button[$.] | //select[$.]", + "//a[@href and ($. or child::img[$@title or $@alt])] | //*[(@onclick or @class='lk' or @role='link' or role='button') and $.] | //input[not(@type='hidden' or @disabled or @readonly) and ($@value or $@placeholder)] | //textarea[not(@disabled or @readonly) and $.] | //button[$.] | //select[$.]", s ); case "e":