mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 22:42:26 +01:00
Lower-case hint text after splitting (to allow for, e.g., (?=[A-Z]))
This commit is contained in:
@@ -138,11 +138,11 @@ function Hints() //{{{
|
|||||||
// TODO: mozilla docs recommend localName instead of tagName
|
// TODO: mozilla docs recommend localName instead of tagName
|
||||||
tagname = elem.tagName.toLowerCase();
|
tagname = elem.tagName.toLowerCase();
|
||||||
if (tagname == "input" || tagname == "textarea")
|
if (tagname == "input" || tagname == "textarea")
|
||||||
text = elem.value.toLowerCase();
|
text = elem.value;
|
||||||
else if (tagname == "select")
|
else if (tagname == "select")
|
||||||
{
|
{
|
||||||
if (elem.selectedIndex >= 0)
|
if (elem.selectedIndex >= 0)
|
||||||
text = elem.item(elem.selectedIndex).text.toLowerCase();
|
text = elem.item(elem.selectedIndex).text;
|
||||||
else
|
else
|
||||||
text = "";
|
text = "";
|
||||||
}
|
}
|
||||||
@@ -511,7 +511,7 @@ function Hints() //{{{
|
|||||||
if (hintStrings.length == 1 && hintStrings[0].length == 0)
|
if (hintStrings.length == 1 && hintStrings[0].length == 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
let words = linkText.split(wordSplitRegex);
|
let words = linkText.split(wordSplitRegex).map(String.toLowerCase);
|
||||||
if (hintStrings.length == 1)
|
if (hintStrings.length == 1)
|
||||||
return charsAtBeginningOfWords(hintStrings[0], words, allowWordOverleaping);
|
return charsAtBeginningOfWords(hintStrings[0], words, allowWordOverleaping);
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user